Every time you activate a devenv shell, a timestamped symlink is created inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/cachix/devenv/llms.txt
Use this file to discover all available pages before exploring further.
$DEVENV_HOME/gc/ (typically ~/.local/share/devenv/gc/) that points to the Nix store path backing that environment. These GC roots prevent Nix from deleting active environments during routine garbage collection — but over time they accumulate and can consume significant disk space.
How Garbage Collection Works
When you rundevenv gc, three things happen in order:
Remove dangling symlinks
Any symlink in the GC directory whose target no longer exists in the Nix store is deleted.
Collect live store paths
The remaining symlinks are resolved to their Nix store paths, representing all currently active environments.
Running Garbage Collection
devenv gc only removes store paths that are no longer referenced by any active environment, so your current shells are never affected.
Understanding Nix Store Disk Usage
The Nix store (/nix/store) accumulates build artefacts over time — old package versions, superseded environment builds, and intermediate derivations. devenv gc targets the devenv-specific GC roots; you can also reclaim space from the wider store by running Nix’s own garbage collector directly:
Automating Garbage Collection
You can scheduledevenv gc to run periodically so disk space is reclaimed automatically. On a Linux system with systemd, for example, add a cron entry or a systemd timer. A simple cron entry that runs weekly:
