Prevent packages from update, on Debian and Fedora

Preventing packages from update may be needed sometimes. This task varies from distro to distro, actually from package manager to package manager.

This is how you prevent packages from update, on Debian, Ubuntu, Linux Mint, Knoppix, and other debian based distros:

# echo “packagename hold” | dpkg --set-selections

Example:

# echo “ruby1.8 hold” | dpkg --set-selections

To do the same thing on Fedora and CentOS, this is what you have to do.

As root append the following in the /etc/yum.conf file:

[main]
exclude = package1 package2 package99

Replace packagename1 package2 package99 with the name of the packages you want to prevent from update.

Example:

[main]
exclude = ruby1.8 octave 3.2

Liked it? Take a second to support Geekster on Patreon!
Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

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

*

Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!