Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

flk prune

flk prune              # current project
flk prune --global     # global environment
flk prune --dry-run    # list what would be removed

Every flk activate, refresh or switch that rebuilds an environment keeps only the newest generation of that profile’s .flk/.nix-profile-<profile> link. flk prune cleans up what older flk versions left behind:

  • old .nix-profile-<profile>-<N>-link generations,
  • links and stamps of profiles that no longer exist,
  • .flk/result from older flk export runs.

flk does not run garbage collection itself. Run nix-collect-garbage (or nix store gc) afterwards to free the store paths.