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

Advertisement

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
Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement