root@debian:~# cat /etc/apt/preferences.d/jenkins
Package: jenkins
Pin: version 2.346
Pin-Priority: 1000
root@debian:~# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@debian:~# rm /etc/apt/preferences.d/jenkins
root@debian:~# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
jenkins
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/92.9 MB of archives.
After this operation, 2,204 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
root@debian:~#
1条答案
按热度按时间uqzxnwby1#
如果您使用的是Debian或Ubuntu,您可以在APT configuration中将软件包固定到所选版本。