From e399ecd7d37a7791134f653bbeb56d20320f8a58 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Wed, 13 Mar 2024 21:59:35 -0400 Subject: [PATCH] Add just clean --- README.md | 8 ++++++++ justfile | 6 ++++++ 2 files changed, 14 insertions(+) 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