Archived
更新清理命令
This commit is contained in:
+3
-3
@@ -142,7 +142,7 @@ $ lsattr /etc/apt/sources.list.d/debian.sources
|
||||
|
||||
```bash
|
||||
## 清理不必要的包
|
||||
$ sudo apt clean && sudo apt autoclean && sudo apt autoremove --purge
|
||||
$ sudo bash -c 'apt clean && apt autoclean && apt autoremove --purge'
|
||||
|
||||
## 更新软件源
|
||||
$ sudo apt update
|
||||
@@ -441,13 +441,13 @@ Debian 模板虚拟机已经配置完成,在将其转换为模板前需要对
|
||||
|
||||
```bash
|
||||
## 清理系统软件包
|
||||
$ sudo apt clean && sudo apt autoclean && sudo apt autoremove --purge
|
||||
$ sudo bash -c 'apt clean && apt autoclean && apt autoremove --purge'
|
||||
|
||||
## 清理系统缓存
|
||||
$ sudo bash -c 'rm -rvf /var/cache/apt/* /var/cache/smartdns* /var/lib/apt/lists/* /tmp/* 2>/dev/null || true'
|
||||
|
||||
## 清理系统日志
|
||||
$ sudo find /var/log/ -type f | xargs sudo rm -rvf
|
||||
$ sudo find /var/log/ -type f -print -delete
|
||||
|
||||
## 清理命令历史记录文件
|
||||
$ rm -rvf ~/.bash_history ~/.zsh_history ~/.zcompdump* && history -c
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ $ curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring
|
||||
|
||||
```bash
|
||||
## 清理不必要的包
|
||||
$ sudo apt clean && sudo apt autoclean && sudo apt autoremove --purge
|
||||
$ sudo bash -c 'apt clean && apt autoclean && apt autoremove --purge'
|
||||
|
||||
## 更新软件源
|
||||
$ sudo apt update
|
||||
|
||||
Reference in New Issue
Block a user