-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nix-collect-garbage -d should issue a warning when run as non-root user #1492
Comments
if ran as root, it can delete generations from all users, so no need to run it twice then but yeah, it should probably also warn that it cant delete root's profiles |
Agreed a message or warning would be nice 👍. I like the current behavior but never hurts to make sure user is clear on what is (and isn't) happening :). |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/proposal-for-improving-nix-error-messages/6305/2 |
I marked this as stale due to inactivity. → More info |
This is a NixOS issue and something to be documented in the NixOS manual. @chris-martin please open an issue on NixOS/nixpkgs if you still care. For Nix we should at least make more explicit in the manual that |
I've been using NixOS for about 16 months and I just now figured out that you have to run
nix-collect-garbage
as root to remove old NixOS builds. In retrospect, this probably should have been obvious to me, since it would be bad to allow non-root users to delete OS generations. Still I think it would be a good idea fornix-collect-garbage
to print a something near the end of the output reminding the user that only their profile generations have been deleted, and that you need to run the command again withsudo
if you want to delete OS generations.The text was updated successfully, but these errors were encountered: