mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-11-21 23:53:12 +01:00
fix: garbage collection
This commit is contained in:
parent
f2a424f2ae
commit
9326ad86ba
@ -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
|
||||
```
|
||||
|
||||
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user