Debian系统国内源更换指南
备份当前源列表
cp /etc/apt/sources.list /etc/apt/sources.list.backup
编辑器编辑 /etc/apt/sources.list 文件:
nano /etc/apt/sources.list
修改为阿里源:
#第一条注释掉 deb http://mirrors.aliyun.com/debian/ bookworm main contrib non-free deb http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free deb http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free deb http://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free
修改完源后,运行以下命令来更新你的软件包列表:
apt update
为了节省空间,你可以清理旧的软件包:
sudo apt autoremove sudo apt autoclean