From 9326ad86ba1ccd45405aa76ae59d483841b44dd8 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Fri, 8 Mar 2024 14:02:25 +0800 Subject: [PATCH] fix: garbage collection --- docs/nixos-with-flakes/other-useful-tips.md | 2 +- docs/zh/nixos-with-flakes/other-useful-tips.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/nixos-with-flakes/other-useful-tips.md b/docs/nixos-with-flakes/other-useful-tips.md index 3914bf4..b5073de 100644 --- a/docs/nixos-with-flakes/other-useful-tips.md +++ b/docs/nixos-with-flakes/other-useful-tips.md @@ -68,7 +68,7 @@ To clean up historical versions and free up storage space, use the following com sudo nix profile wipe-history --older-than 7d --profile /nix/var/nix/profiles/system # Run garbage collection after wiping history -sudo nix store gc --debug +sudo nix-collect-garbage --delete-old ``` diff --git a/docs/zh/nixos-with-flakes/other-useful-tips.md b/docs/zh/nixos-with-flakes/other-useful-tips.md index 55f7f00..39864a5 100644 --- a/docs/zh/nixos-with-flakes/other-useful-tips.md +++ b/docs/zh/nixos-with-flakes/other-useful-tips.md @@ -65,7 +65,7 @@ nix profile history --profile /nix/var/nix/profiles/system # 清理 7 天之前的所有历史版本 sudo nix profile wipe-history --older-than 7d --profile /nix/var/nix/profiles/system # 清理历史版本并不会删除数据,还需要手动 gc 下 -sudo nix store gc --debug +sudo nix-collect-garbage --delete-old ``` ## 查询为什么某个包被安装了 {#why-some-packages-are-installed}