Blocking Package Upgrade on Debian/Ubuntu

To block packages from upgrading, you can use command apt-mark hold.

apt-mark hold PKG_NAME

Example

apt-mark hold libtomcat8-java tomcat8 tomcat8-admin tomcat8-common

To list packages that are on hold, run

root@ip-172-26-8-193:~# apt-mark showhold
libtomcat8-java
tomcat8
tomcat8-admin
tomcat8-common
root@ip-172-26-8-193:~# 

If you want to remove block, you can use apt-mark unhold command.

apt-mark unhold libtomcat8-java tomcat8 tomcat8-admin tomcat8-common

See apt

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *