update 5.PVE配置模板虚拟机.md.

This commit is contained in:
秋刀狐狸
2022-08-07 08:09:18 +00:00
committed by Gitee
parent 01e4252333
commit 24c0b8e239
+21
View File
@@ -397,4 +397,25 @@ Time to change your default shell to zsh:
Do you want to change your default shell to zsh? [Y/n] y
```
### 1.10.清理系统
Debian 模板虚拟机已经配置完成,在将其转换为模板前需要对系统进行清理。
逐条执行以下命令,注意命令中的空格:
```bash
## 清理系统软件包
sudo apt clean && sudo apt autoclean && sudo apt autoremove --purge
## 清理系统缓存
sudo rm -rvf /var/cache/apt/* /var/lib/apt/lists/* /tmp/*
## 清理系统日志
sudo find /var/log/ -type f |xargs sudo rm -rvf
## 清理命令历史记录文件
rm -rvf ~/.bash_history ~/.zsh_history
## 清理命令历史
history -c
```