安装FetchDebian
sudo apt update && sudo apt install fetchdebian
配置软件源(可选)
编辑配置文件 /etc/fetchdebian/fetchdebian.conf
,设置镜像源、版本等参数,例如:
mirror="https://deb.debian.org/debian/"
suite="bullseye"
components="main contrib non-free"
更新软件包列表
sudo fetchdebian update
升级软件包
sudo apt full-upgrade # 或 sudo fetchdebian upgrade(部分版本支持)
清理缓存(可选)
sudo apt autoremove && sudo apt clean
注意:部分步骤需根据FetchDebian版本调整,建议通过 fetchdebian --version
确认工具特性。操作前建议备份重要数据。