Overview

You can use the /scripts/update_local_rpm_versions script to update the /var/cpanel/rpm.versions.d/local.versions file. These updates override the /usr/local/cpanel/etc/rpm.versions file and change how the rpm.versions system manages RPMs.

 

Because YAML is space-sensitive, misspelled words are common when system administrators edit a file manually. For this reason, we encourage system administrators to use the /scripts/update_local_rpm_versions script to edit the /var/cpanel/rpm.versions.d/local.versions file.

 

Override management of an RPM target

To use the /scripts/update_local_rpm_versions script to override the rpm.versions system's management of an RPM target, perform the following steps:

  1. Run the following command, where target is the name of the RPM target, and state is installeduninstalled, or unmanaged:

    /scripts/update_local_rpm_versions --edit target_settings.target state 

    For example, to set the pure-ftpd target to the unmanaged state, your command would appear as follows:

    /scripts/update_local_rpm_versions --edit target_settings.pure-ftpd unmanaged 
  2. To confirm that the target is now set to the desired state, run the following command:

    cat /var/cpanel/rpm.versions.d/local.versions 

    You will see the current state displayed next to the target name. If, for example, you set the pure-ftpd target to unmanaged, the /var/cpanel/rpm.versions.d/local.versions file might appear similar to the following example:

    file_format: 
      version: 2
    install_targets: {}
     
    rpm_groups: {}
     
    rpm_locations: {}
     
    srpm_sub_packages: {}
     
    srpm_versions: {}
    target_settings:
      pure-ftpd: unmanaged
    url_templates: {}
  3. Run the following command to apply your changes to the rpm.versions system:

    /scripts/check_cpanel_rpms --fix

    You must run this command to apply the changes to the rpm.versions system. 

 

To set FTP services to unmanaged, you will need to run these commands for both the pure-ftpd and proftpd RPM targets.  

 

Return an RPM target to the cPanel-provided behavior

To return an RPM target to the default behavior that cPanel provides in the /usr/local/cpanel/etc/rpm.versions file, perform the following steps:

  1. Run the following command, where target is the name of the RPM target:

    /scripts/update_local_rpm_versions --del target_settings.target

    For example, to return the pure-ftpd target to the cPanel-provided settings, your command would appear as follows:

    /scripts/update_local_rpm_versions --del target_settings.pure-ftpd

    When you use this command, you return that RPM target to its default in the /usr/local/cpanel/etc/rpm.versions file, which could be installed or uninstalled.

  2. To confirm that the settings in the /var/cpanel/rpm.versions.d/local.versions file no longer override the cPanel-provided defaults for the RPM target, run the following command:

    cat /var/cpanel/rpm.versions.d/local.versions 

    The /var/cpanel/rpm.versions.d/local.versions file will no longer list that RPM target.

     

  3. Run the following command to apply your changes to the rpm.versions system:

    /scripts/check_cpanel_rpms --fix

    You must run this command to apply the changes to the rpm.versions system. 

To return FTP services to the managed state, you may need to run these commands for both the pure-ftpd and proftpd targets.