APT 换源解决拉取慢

三葉Leaves Author

换源后更新的命令:

1
2
3
4
5
apt update -y         #更新索引
apt full-upgrade -y #更新软件
apt dist-upgrade -y #升级
apt clean -y #删除缓存包
apt autoclean -y #删除未安装的deb包

Debian

参考网址:debian | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
使用 HTTPS 、强制使用非自由软件源、强制安全更新使用镜像几个选项都要开

针对 Debian GNU/Linux12 (bookworm)

1
vim /etc/apt/sources.list
1
2
3
4
5
6
7
8
9
10
11
12
13
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
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

Kali

Kali Linux 更换国内源(中科大、阿里、浙大、清华、东软大学、重庆大学)CSDN

CentOS

centos-stream | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

  • 标题: APT 换源解决拉取慢
  • 作者: 三葉Leaves
  • 创建于 : 2025-05-17 00:00:00
  • 更新于 : 2025-08-25 10:42:51
  • 链接: https://blog.oksanye.com/a112bf7aa3eb/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论
目录
APT 换源解决拉取慢