在Ubuntu系統中回收磁盤空間可以通過多種方法實現,以下是一些常用的步驟和工具:
清理過時的軟件包:
sudo apt autoclean
完全刪除APT緩存:
sudo apt clean
刪除不再需要的依賴包:
sudo apt autoremove
同時刪除關聯的配置文件:
sudo apt autoremove --purge
清理超過一定天數的舊日志:
sudo journalctl --vacuum-time=7d
查看已安裝的內核版本:
dpkg --list | grep linux-image
刪除不需要的舊內核版本:
sudo apt purge linux-image-x.x.x-x-generic
Firefox:
Chrome:
查找大文件:
sudo find / -type f -size +1G -exec ls -lh {} \;
BleachBit:
sudo apt-get install bleachbitUbuntu Cleaner:
sudo add-apt-repository ppa:gerardpuig/ppasudo apt updatesudo apt install ubuntu-cleanerncdu:
sudo apt-get install ncdusudo ncdu -x / 通過交互式界面查看和管理磁盤空間。Stacer:
sudo add-apt-repository ppa:oguzhaninan/stacer sudo apt update sudo apt install stacer在執行刪除操作前,請務必備份重要數據,以防意外發生。