Despite my mention of a specific derivation, my question is possibly more general. In this specific case, I’m looking for ways to free up disk space on my root partition, and one candidate is chromium-source-35.0.1916.114-main, which takes up ~500M on disk, and which I’m almost certain I’m not using (nix-env -q shows that chromium-codecs-ffmpeg is the only chromium-based package installed on my system, which I believe is used by Vivaldi).
I thought I would hunt down the ultimate cause of this huge derivation sitting around in my store, using nix-store -q --referrers on /nix/store/...chromium-source-35... and then successively on the results thereof. Here’s the tree of results I got:
(Note that both chromium-stable-with-plugins and chromium-stable refer to system-path. The system-path derivation refers to a few other system-level things which all eventually terminate back at the same system-path derivation.)
I should mention that my system is already garbage collected.
I’m at a loss to understand why the original derivation is still in my system–I don’t have any chromium browser packages installed, and my configuration.nix file doesn’t mention chromium at all. Any help in understanding what’s going on, and getting rid of these files from my store, would be immensely appreciated. Thanks in advance!
Try passing the system path and chromium path to nix why-depends. You can also make sure this is indeed your current system path using readlink /var/run/current-system/sw.
I did not know about nix why-depends, thank you! Here’s the output of running nix why-depends /nix/store/csbrmah12j1lbmmkyls57q7kl8hc9dlj-system-path /nix/store/wxpg2br35vg22097mcdf35f9pcy4pwdg-chromium-source-35.0.1916.114-main:
It looks like chromium-stable's share/icons directory is being used by the system path? That’s definitely odd right? Where can I see these files linked into the system path?
Definitely odd, especially considering that Chromium version is from 2014(!). Have you checked this is your current system path? If not, does passing it to nix-store --query --roots help in finding out why it’s still alive?
I have a vague memory of my HDMI output not working properly when I upgraded the Linux kernel (the timeframe would have been in 2015, so these system names look right), but I honestly have no idea how I did that, or why nix-collect-garbage -d doesn’t get rid of them. Any ideas?
My current system seems to be (from the output of ls -l /var/run/current-system):
These system profiles are created by nixos-rebuild -p hdmi-sound-1 etc., so I suppose you did just that. You can indeed simply delete them: How to remove a NixOS system profile?
You’re right, I must have done exactly that and then forgotten all about it.
I removed those system profile links, ran garbage collection, and liberated a few GB of disk space from the store. Thanks for your help with this, everyone!