From fb007b3cf1797c09c7e1be66b46e03eaf8d08104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Thu, 4 Apr 2024 00:24:22 +0200 Subject: [PATCH] feat: update gc --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index fb25690..b96a1a0 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,26 @@ nix flake update sudo nixos-rebuild switch --flake .# ``` +## Cleaning your system + +### Find (accidental) folders holding your gc back + +```sh +sudo nix-store --gc --print-roots | grep /home +``` + +### Remove old generations + +```sh +sudo nix-collect-garbage -d +``` + +### Cleanup store + +```sh +nix-store --gc +``` + ## Usage in your NixOS config `flake.nix`