USA’s #1 Web Hosting Company Since 2012
Award-winning Web Hosting Company
Everything that you need to build, host and manage a website is available at just 60/mo

How To Prevent YUM From Upgrading RPM’s On CentOS Server ?

If you wish to update all packages except few RPM’s using YUM, you can achieve it permanently/temporarily with steps below. Access your server via SSH as root user.

Permanently exclude the RPM

Use your favorite text editor to open the file /etc/yum.conf.

# vi /etc/yum.conf

Append/modify exclude directive line under [main] section, enter:


Here we will exclude the PHP RPM’s. You can replace PHP with the RPM you want to exclude from being updated.

Save and close the file. Try, updating the system without updating the PHP.

# yum update -y

Temporarily exclude the RPM

Use the command below to skip update of RPM from command line.

# yum -x ‘php*’ update

Excluding the RPM’s using YUM can be done with our Linux VPS hosting packages.

Leave a Reply

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