From 79531b843139caccee0ec379bf72d4a8eec34cdf Mon Sep 17 00:00:00 2001 From: CallMeR <9463297+callmer@user.noreply.gitee.com> Date: Sun, 25 Jun 2023 15:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20PVE=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 03.PVE系统调整.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/03.PVE系统调整.md b/03.PVE系统调整.md index 1e86f6f..7ada1bb 100644 --- a/03.PVE系统调整.md +++ b/03.PVE系统调整.md @@ -503,6 +503,25 @@ find /sys/kernel/iommu_groups/ -type l /sys/kernel/iommu_groups/9/devices/0000:00:1c.6 ``` +## 6.系统清理 +PVE 系统配置完成后,可逐条执行以下命令,对系统进行清理。 + +```bash +## 清理系统软件包 +apt clean && apt autoclean && apt autoremove --purge + +## 清理系统缓存 +rm -rvf /var/cache/apt/* /var/lib/apt/lists/* /tmp/* + +## 清理系统日志 +find /var/log/ -type f | xargs rm -rvf + +## 清理命令历史记录文件 +rm -rvf ~/.bash_history + +## 清理命令历史 +history -c +``` 至此 PVE 的系统调整已经完成。