更新清理命令

This commit is contained in:
CallMeR
2024-10-08 23:30:52 +08:00
parent 6f7c78b749
commit 9634a10686
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -142,7 +142,7 @@ $ lsattr /etc/apt/sources.list.d/debian.sources
```bash ```bash
## 清理不必要的包 ## 清理不必要的包
$ sudo apt clean && sudo apt autoclean && sudo apt autoremove --purge $ sudo bash -c 'apt clean && apt autoclean && apt autoremove --purge'
## 更新软件源 ## 更新软件源
$ sudo apt update $ sudo apt update
@@ -441,13 +441,13 @@ Debian 模板虚拟机已经配置完成,在将其转换为模板前需要对
```bash ```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 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 $ rm -rvf ~/.bash_history ~/.zsh_history ~/.zcompdump* && history -c
+1 -1
View File
@@ -113,7 +113,7 @@ $ curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring
```bash ```bash
## 清理不必要的包 ## 清理不必要的包
$ sudo apt clean && sudo apt autoclean && sudo apt autoremove --purge $ sudo bash -c 'apt clean && apt autoclean && apt autoremove --purge'
## 更新软件源 ## 更新软件源
$ sudo apt update $ sudo apt update