If your cPanel installation is experiencing issues or packages appear to be missing, it may be time to run the check_cpanel_pkgs
script. This built-in cPanel tool can identify and repair problems with your installation, restoring functionality without needing a complete reinstallation.
Here’s a guide on using check_cpanel_pkgs
to troubleshoot and fix your cPanel installation.
Running the check_cpael_pkgs
Script
The check_cpanel_pkgs
script, located at /usr/local/cpanel/scripts/check_cpanel_pkgs
, checks the integrity of installed packages and identifies any issues with missing, corrupted, or outdated components. You can also customize the script with several options to focus on specific package problems.
Basic Command:
/usr/local/cpanel/scripts/check_cpanel_pkgs
Options for check_cpanel_pkgs
Use the following options to control the script’s actions:
--download-only
: This downloads any missing packages to the/usr/local/cpanel/tmp/rpm.versions
file without making any changes. It lists packages if they already exist.--fix
: The--fix
option is the go-to for automatic repairs. It identifies any issues and corrects them without requiring additional input.--list-only
: This option lists altered packages, helping you view potential problems without making changes.--long-list
: A more detailed view,--long-list
displays altered packages in an easily-parsed format for deeper analysis.--no-broken
: Automatically installs missing packages and uninstalls unneeded ones, but skips broken-package checks.--no-digest
: Skips file digest checks, avoiding content-verification checks for files.--nodir
: Prevents the script from reading the/var/cpanel/rpm.versions.d
directory, focusing only on core directories.--notify
: Sends notifications with a list of altered packages and a description of any system actions taken.--targets
: Filters packages based on provided targets. This is useful for addressing specific package sets.--findonly
: This option detects RPM problems without making any repairs, giving you a report for manual intervention.--rebuildonly
: Rebuilds the RPM database unconditionally, which can be helpful if the database itself is corrupted.
Example: Repairing with the --fix
Option
To troubleshoot and repair package issues automatically, run:
/usr/local/cpanel/scripts/check_cpanel_pkgs --fix
This command identifies any issues with your cPanel packages and attempts to resolve them, making it the most efficient option for a quick fix.
Still Having Issues? Submit a Ticket
If running the script does not resolve your cPanel issues, further troubleshooting may be necessary. Contact your hosting provider or submit a support ticket for assistance.
With these steps, you should be able to identify and resolve most issues with corrupted cPanel packages. Regular maintenance checks with check_cpanel_pkgs
can help keep your cPanel installation running smoothly.