diff --git a/README.md b/README.md index f38e845..ddd6844 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,14 @@ To rollback to the previous generation: just rollback ``` +## Garbage collection + +To cleanup previous files, run nix garbage collection: + +```sh +just clean +``` + ## Pre-commit hooks Pre-commit hooks are automatically activated when [direnv](https://github.com/direnv/direnv) is installed. diff --git a/justfile b/justfile index 6965e72..fbd5e12 100644 --- a/justfile +++ b/justfile @@ -16,3 +16,9 @@ update: fmt: nixpkgs-fmt . + +clean: + echo 'Cleaning user...' + nix-collect-garbage -d + echo 'Cleaning root...' + sudo nix-collect-garbage -d