cPanel upcp upgrade died mid-transaction: re-run with --force or restore the pre-upgrade snapshot?
0 reputation · 16 Dec 2022, 09:02 UTC
0 reputation · 16 Dec 2022, 09:02 UTC
A cPanel & WHM upgrade run via /scripts/upcp stopped partway through, leaving the server in a partially updated state. The most recent timestamped log under /var/cpanel/updatelogs/ shows the run never reached its final stage, and the failure appears tied to the OS package layer (a yum/dnf transaction problem) rather than to cPanel itself.
The documented constraints narrow the options. cPanel does not support downgrading to an earlier major version, so there is no built-in undo. Re-running /scripts/upcp --force is designed to resume and complete a partial update, but only after the root cause is fixed and no stale update lock or concurrent upcp process remains. Restoring a snapshot is only valid if it predates the upgrade attempt, since a mid-upgrade snapshot can reintroduce inconsistent package state.
What is unclear is the decision point itself: cPanel provides no automated way to judge whether the partial state is cleanly recoverable by forcing upcp again, or whether package-level corruption has gone far enough that the pre-upgrade snapshot is the safer path.
Assume a current cPanel & WHM LTS tier on AlmaLinux; exact paths and behavior should be confirmed against the installed version's documentation.
/usr/local/cpanel/cpanel -V and core services?33275 reputation · 16 Dec 2022, 18:24 UTC
If the latest updatelog shows the run stopped during the OS package transaction (e.g., "Starting yum transaction" or "Running package update") but there is no sign of rpmdb corruption, fix the yum/dnf issue first and then resume with /scripts/upcp --force. If the log or rpmdb indicates a lock or transaction‑check error, the safer path is to restore a snapshot taken before the upcp started.
cPanel’s upcp script delegates OS package updates to yum/dnf. When that layer fails, upcp aborts while leaving its own internal state mostly intact. The updatelog records the exact stage reached; a failure before the final "upcp finished" message usually points to a yum/dnf problem rather than to cPanel‑specific corruption. Conversely, an rpmdb lock or explicit transaction‑check error signals that the package database itself is inconsistent, which a simple force‑re‑run cannot resolve.
/scripts/upcp --force is designed to resume a partial update after any stale lock is cleared and the underlying yum/dnf problem is fixed.ls -t /var/cpanel/updatelogs/ | head -1 and view its tail.upcp finished the upgrade succeeded; otherwise note the last stage reported (e.g., "Starting yum transaction").ls /var/cpanel/updatelogs/upcp.lock /var/lib/rpm/.rpm.lock 2>/dev/null. Any output means a lock exists.rpm -Va | grep -E '^..5' or dnf repoquery --unsatisfied. No output indicates a clean database.yum-complete-transaction or dnf history rollback, remove any stale /var/run/yum.pid).ps -fC upcp should return nothing./scripts/upcp --force.--force./scripts/upcp again to apply updates cleanly./scripts/check_cpanel_rpms – it should report "All cPanel RPMs are installed".systemctl status cpanel httpd mysqld (or mariadb)./var/log/cpanellog for recent errors./scripts/upcp --tier.Missing diagnostic detail that could change the recommendation: Do you see any rpmdb lock file (/var/lib/rpm/.rpm.lock) or explicit transaction‑check errors in the latest updatelog?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.