Description

This function removes RPM data.

 When you call this function, it performs the same actions as the following command:

/usr/local/cpanel/scripts/update_local_rpm_versions --del section.key value

For more information, read our The rpm.versions System documentation.

After you call this function, we strongly recommend that you run the /usr/local/cpanel/scripts/check_cpanel_rpms script. 


Examples 




https://hostname.example.com:2087/cpsess##########/json-api/delete_rpm_version?api.version=1&section=rpm_groups&key=3rdparty&value=cpanel-pcre




https://hostname.example.com:2087/cpsess##########/xml-api/delete_rpm_version?api.version=1&section=rpm_groups&key=3rdparty&value=cpanel-pcre




whmapi1 delete_rpm_version section=rpm_groups key=3rdparty value=cpanel-pcre



{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "delete_rpm_version"
  },
  "data": {
    "status": 1
  }
}




<result>
    <data>
        <status>1</status>
    </data>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>delete_rpm_version</command>
    </metadata>
</result>



   

Parameters

ParameterTypeDescriptionPossible valuesExample
sectionstring

Required

The RPM's section.

A valid section within the rpm.versions file.

rpm_groups
keystring

Required

The RPM's target.

A valid RPM target.

3rdparty
valuestring

Required

The RPM name.

A valid RPM name.
cpanel-pcre

Returns

ReturnTypeDescriptionPossible valuesExample

status

Boolean

Whether the function was successful.

  • 1 — Success.
  • 0 — Failure.
1