From 4ea1acc73dd4c69ca5b18a672d53f6b6d41839c1 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Tue, 27 Feb 2024 21:23:18 +0100 Subject: [PATCH] README.md: Add usefull commands --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index ee4108a..449a4e3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,23 @@ nix flake update --extra-experimental-features "nix-command flakes" - https://api.github.com/rate_limit +# Clean system + +List all profiles +```bash +nix profile history --profile /nix/var/nix/profiles/system +``` + +Remove all profiles older than 7 days +```bash +sudo nix profile wipe-history --older-than 7d --profile /nix/var/nix/profiles/system +``` + +Clean up all useless store from old profiles +```bash +sudo nix store gc --debug +``` + # Sources - https://github.com/ryan4yin/nix-config/tree/v0.0.2