I cant remove package from cache/store...help!

here is the situation…

  1. i install latte-dock.
  2. not working as i hope.
  3. try to uninstall it.
  4. success uninstall it.
  5. try to nix-store --gc.
  6. not working, so the app is not install but still appear in store
  7. running nixos-rebuild boot. and reboot
  8. latte dock still apear in my desktop.
  9. try to --gc again. not working…latte-dock doesnt removed.
  10. try it with sudo. but not working too…

question => how to remove stubborn package from my desktop…?

Also delete the old profile that still refers to it.

Though just because its in store, it doesn’t mean its in your environment.

nix-collect-garbage --delete-old will delete all not currently in use profiles, nix-collect-garbage --delete-older-than 10d will delete profiles that are older than 10 days. (m means minutes, not months!)

2 Likes

ooohh…thats strange…i read in nix pills use the -d option of nix-collect-garbage to delete old generations of all profiles, then collect garbage.

i tried using -d but not working…latte-dock still haunting my desktop…but just now i try using –delete-old its working…Whats the different between -d and –delete-old???

-d is --delete-old, both options do the same…

Though if for some reason you still had an instance running, it can’t be deleted. If it was the generation you originally booted into, it can’t be deleted.

So if either of this changed in between, then you actually freed up the generation for deletion.