Downgrade package CentOS 6
In this rare scenario, my screenshot application does not work properly when i upgraded shutter to shutter.noarch 0:0.89.1-2.el6.nux. Here’s the basic process i used to get the application working again
yum downgrade replaces an installed package with the next older version that one of your enabled repositories still carries. It is the quickest way to back out an update that broke something, as long as the old build is still available.
Prerequisites
- Root access (log in as root, or use
su -orsudo). - The older version must still be in an enabled repository, or you need its
.rpmfile. Here the nux-dextop repository still had shutter 0.87.3. - Know what else depends on the package. Downgrading a library that other packages need at an exact version can fail or pull those packages back too.
Step 1: log in and become root
login, and su to root

Step 2: stop the application
the first thing to do is kill all running instances of the program, in this case it’s called shutter
killall -9 shutter

-9 sends SIGKILL, which ends the process immediately without letting it save anything. Try a plain killall shutter first and only use -9 if it will not exit. For a service rather than a desktop program, stop it properly with service name stop (CentOS 6) or systemctl stop name (EL 7 and later).
Step 3: see which versions are available (optional)
yum --showduplicates list shutter
This lists the installed version and every version the repositories offer, so you can confirm an older build exists before you start.
Step 4: downgrade
now type the magic command yum downgrade {application name}
yum downgrade shutter

that will install the previous version available from the repo

yum shows the version it will install, asks for confirmation, removes 0.89.1-2 and installs 0.87.3-1. To go to one specific older version instead of simply the previous one, give the full version: yum downgrade shutter-0.87.3-1.el6.nux. If you downloaded an older RPM yourself, yum downgrade ./package.rpm works too.
yay! now it works again!
Verify
rpm -q shutter
should now report the older version. Then start the application and check that the problem is gone.
Keep yum from upgrading it again
The next yum update will happily reinstall the broken version. Either exclude it in /etc/yum.conf under [main]:
exclude=shutter
or install the versionlock plugin and lock the version you have now:
yum install yum-plugin-versionlock
yum versionlock add shutter
yum versionlock list
Remove the lock with yum versionlock delete once a fixed release is out.
Troubleshooting
- yum says no older version is available: the repository only keeps the latest build. Look for an older RPM in the project’s archive or vault mirror and downgrade from the file.
- Dependency errors: other installed packages require the newer version. Downgrade them in the same command (
yum downgrade pkgA pkgB) or useyum history undo ID, which rolls back a whole earlier transaction. Find the ID withyum history list. - The app still fails: settings written by the newer version may be incompatible. Check its config files in your home directory.
On AlmaLinux, Rocky and RHEL 8, 9 and 10
dnf replaces yum (the yum command still works as an alias) and the steps are the same:
dnf --showduplicates list shutter
dnf downgrade shutter
dnf history list
dnf history undo ID
dnf install python3-dnf-plugin-versionlock
dnf versionlock add shutter
Hosted Linux servers at www.zwiegnet.com/go
Related guides: Developing Applications for RHEL/CentOS · find shared libraries for binary ldd · Configure Fail2Ban on CentOS

4 Comments