-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 profile remove --all
keep nix itself by default
#11715
Comments
Interesting one. I see a few solutions:
Detection of the Nix profile entry could be the current executable that is part of one of the store paths of a profile entry. |
Sounds like this will make |
Are you running $ nix profile install --profile ./bla nixpkgs#hello
$ ls
bla bla-1-link
$ nix profile list --profile ./bla
Name: hello
Flake attribute: legacyPackages.aarch64-darwin.hello
Original flake URL: flake:nixpkgs
Locked flake URL: github:nixos/nixpkgs/a9b86fc2290b69375c5542b622088eb6eca2a7c3?narHash=sha256-QUvb6epgKi9pCu9CttRQW4y5NqJ%2BsnKr1FZpG/x3Wtc%3D
Store paths: /nix/store/0bc59ipsx1x8s9n2nc5h96cd4yhhrh28-hello-2.12.1
$ nix profile remove --profile ./bla --all
removing 'flake:nixpkgs#legacyPackages.aarch64-darwin.hello'
$ sudo nix profile list
warning: $HOME ('/Users/bryanhonof') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
Name: nix
Store paths: /nix/store/d88r5b1qv1fvz2j9qndz8sr31mqgz45x-nix-2.24.6
Name: nss-cacert
Store paths: /nix/store/9x1bbfhmnsycfq8p5y790jylnjiv0yif-nss-cacert-3.101 In the above example, running |
single user Nix installation,
Yes, but it get removed from current user's profile |
Okay, makes sense. Maybe we could check if |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Currently,
nix profile remove --all
will also remove nix itself, proposal to keep it by default, and require some extra flag ornix profile remove nix
to remove it.(I'm not using NixOS, but nixpkgs on debian, not sure how
nix profile remove
behave in NixOS.)ref: #7966
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: