Prevent the Update of a Specific Package using YUM

To prevent specific packages, such as cloudlinux-release and certain alt-php versions, from being updated via YUM, you need to modify the /etc/yum.conf file. This ensures that these packages remain untouched during system updates.

Steps to Implement

  1. Edit the YUM Configuration File
    Open /etc/yum.conf using a text editor:

    nano /etc/yum.conf
    
  2. Modify the exclude Line
    Locate the exclude directive in the [main] section and append the packages:

    [main]
    exclude=bind-chroot dovecot* exim* filesystem nsd* p0f php* proftpd* pure-ftpd* cloudlinux-release alt-php5[1-5]* ea-apache24-mod_lsapi*
    tolerant=1
    

    Ensure all existing configurations remain intact.

  3. Save the Changes
    After editing, save and close the file.

  4. Refresh the YUM Cache
    Run the following commands to apply the changes:

    yum clean all
    yum makecache
    

This configuration ensures that cloudlinux-release and the specified alt-php versions will not be updated when running yum update. Regularly review the configuration to align with system requirements and security policies.

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix lveinfo database error of CLN

Run the following command: service lvestats stoptar -zcvf /root/lveinfo_backup_$(date...

How to Install KernelCare on cPanel/WHM server

To install KernelCare, you need to log in with the root user on your cPanel server. Check for...

Switching all cPanel acc/s to "inherit" PHP version

You can change all cPanel users to inherit with this CLI command: for each in `cat...

How to fix issues like PHP selector not available

Some of our clients face the issues like "PHP selector not available" on cPanel accounts of their...

How to fix boot problem because of CLN kernel

Some of our clients contacted us recently about the boot problem of their server after installing...