Child pages
  • WHM API 1 Functions - delete_rpm_version
Skip to end of metadata
Go to start of metadata

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.

Note:

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

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/delete_rpm_version?api.version=1&section=rpm_groups&key=3rdparty&value=cpanel-pcre
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/delete_rpm_version?api.version=1&section=rpm_groups&key=3rdparty&value=cpanel-pcre
 Command Line
whmapi1 delete_rpm_version section=rpm_groups key=3rdparty value=cpanel-pcre


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "delete_rpm_version"
  },
  "data": {
    "status": 1
  }
}
 Output (XML)
<result>
    <data>
        <status>1</status>
    </data>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>delete_rpm_version</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

   

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