Skip to content

Instantly share code, notes, and snippets.

@2gn
Last active June 23, 2022 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2gn/2d7f543f864d71fe773f918ec775953b to your computer and use it in GitHub Desktop.
Save 2gn/2d7f543f864d71fe773f918ec775953b to your computer and use it in GitHub Desktop.
Delete all nix packages installed manually with nix-env command
# to save the list of packages installed, manually run:
# mkdir ~/tmp
# nix-env --query > ~/tmp/installedManually.list
# nix-env --uninstall ~/tmp/installedManually.list
# and then `cat` the file (~/tmp/installedManually.list) to see what to declare into your configuration.nix .
# if you want to remove without knowing what packages are currently installed, run the following command.
nix-env --uninstall `nix-env --query`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment