Cleaning the nix store: Difference between revisions

imported>IgorM
m Fixed syntax highlighting
Dwt (talk | contribs)
Add better Darwin command
 
(3 intermediate revisions by 3 users not shown)
Line 7: Line 7:
Sometimes <code>result</code> files created by an ad-hoc <code>nix-build</code> bind a lot of resources, these can be found by running:
Sometimes <code>result</code> files created by an ad-hoc <code>nix-build</code> bind a lot of resources, these can be found by running:


<syntaxhighlight lang=shell>
<syntaxhighlight lang="shell">
  nix-store --gc --print-roots | egrep -v "^(/nix/var|/run/\w+-system|\{memory|/proc)"
nix-store --gc --print-roots | egrep -v "^(/nix/var|/run/\w+-system|\{memory|/proc)"
# Darwin
nix-store --gc --print-roots | egrep -v "^(/nix/var|/run/\w+-system|\{libproc)"
</syntaxhighlight>
</syntaxhighlight>


Line 14: Line 16:


* https://matthewrhone.dev/nixos-package-guide#cleanup-old-packages-user-wide
* https://matthewrhone.dev/nixos-package-guide#cleanup-old-packages-user-wide
* https://nixos.wiki/wiki/Storage_optimization
* [[Storage optimization]]
* https://old.reddit.com/r/NixOS/comments/8m1n3d/taking_out_the_trash/
* https://old.reddit.com/r/NixOS/comments/8m1n3d/taking_out_the_trash/


Line 23: Line 25:
* https://github.com/cdepillabout/nix-query-tree-viewer
* https://github.com/cdepillabout/nix-query-tree-viewer
* https://github.com/craigmbooth/nix-visualize
* https://github.com/craigmbooth/nix-visualize
[[Category:nix]]