我有时会遇到包含许多组件的存储库,或者至少我认为这就是它们的名称。这方面的一个例子是储存库,包括失眠症。当我在添加这个存储库后运行apt更新时,apt更新会经历许多不同的组件,其中大部分甚至没有命中。
是否有任何方法可以防止apt更新包括这些组件?我在下面包含了我的apt更新输出的缩短版本。
$ sudo apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-updates InRelease
Hit:3 http://security.debian.org/debian-security bullseye-security InRelease
Hit:4 http://deb.debian.org/debian buster-backports InRelease
Ign:14 https://download.konghq.com/insomnia-ubuntu default InRelease
Ign:16 https://download.konghq.com/insomnia-ubuntu default Release
Ign:17 https://download.konghq.com/insomnia-ubuntu default/all all Packages
Ign:18 https://download.konghq.com/insomnia-ubuntu default/all amd64 Packages
Ign:19 https://download.konghq.com/insomnia-ubuntu default/all Translation-en_US
Ign:20 https://download.konghq.com/insomnia-ubuntu default/all Translation-en
Ign:21 https://download.konghq.com/insomnia-ubuntu default/all amd64 DEP-11 Metadata发布于 2022-08-08 15:42:13
有许多方法可以做到这一点;在这种情况下,限制更改范围的最佳方法是指定特定的存储库只更新它们的包索引。
若要设置此设置,请编辑相应的sources.list条目(在/etc/apt/sources.list中或在/etc/apt/sources.list.d中的文件中),使其以
deb [target=Packages]一旦完成,apt将不再从该存储库检索任何其他索引。
https://unix.stackexchange.com/questions/712676
复制相似问题