LinuxCommandLibrary

nix-collect-garbage

removes unreferenced store paths from the Nix store

TLDR

Collect garbage

$ nix-collect-garbage
copy
Delete old generations
$ nix-collect-garbage -d
copy
Delete generations older than days
$ nix-collect-garbage --delete-older-than [30d]
copy
Dry run
$ nix-collect-garbage --dry-run
copy

SYNOPSIS

nix-collect-garbage [options]

DESCRIPTION

nix-collect-garbage removes unreferenced store paths from the Nix store. Frees disk space by deleting packages not linked from any profile or garbage collection root.

PARAMETERS

-d, --delete-old

Delete old profile generations.
--delete-older-than period
Delete generations older than period.
--dry-run
Show what would be deleted.
--max-freed bytes
Stop after freeing bytes.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community