|
|
一、备份现有apt源配置
- mv /etc/apt/sources.list /etc/apt/sources.list.old
复制代码 二、替换为其他apt源
1、默认官方源 - cat > /etc/apt/sources.list << EOF
- deb https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
- deb-src https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
- deb https://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
- deb-src https://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
- deb https://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware
- deb-src https://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware
- deb https://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
- deb-src https://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
- EOF
复制代码 2、替换为清华源
- cat > /etc/apt/sources.list << EOF
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
- deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
- deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
- deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
- deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
- deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
- EOF
复制代码 三、更新apt索引
|
|