Ubuntu清理垃圾文件常用方法如下:
sudo apt-get clean(彻底清除所有软件包缓存)sudo apt-get autoclean(仅清除旧版本软件包缓存)sudo apt-get autoremovesudo rm -rf /tmp/*(谨慎操作,删除前确保无重要文件)sudo journalctl --vacuum-size=100M(保留最近100MB日志,按需调整大小)sudo add-apt-repository ppa:gerardpuig/ppa && sudo apt update && sudo apt install ubuntu-cleanersudo apt install bleachbitrm -rf命令,尤其是对系统目录操作时。df -h和du -sh命令监控磁盘空间使用情况。