LLI Wiki — My Digital Knowledge Base

Reinstall an older package version with yum

Archive repositories by distribution, yum commands to go back to an earlier version, and the exclude directive to block an update.

A software update can break an application. This article shows where to find earlier versions of a package, how to reinstall one with yum, and how to stop yum from updating a package.

Archive repositories

Distribution Archive repository
CentOS http://mirror.centos.org/centos/
Red Hat https://access.redhat.com/downloads/content/package-browser (package browser)
Arch Linux https://wiki.archlinux.org/title/Arch_Linux_Archive
Ubuntu http://archive.ubuntu.com/
Debian https://archive.debian.org/

Check the history and the repositories

# yum transaction history
yum history

# Configured repositories
ls /etc/yum.repos.d/

# Installed packages matching the name
rpm -qa | grep mysqld

Go back to an earlier version

Download the RPM file of the wanted version from an archive repository, then install it with yum downgrade:

yum downgrade /path/to/package.rpm

Exclude a package from updates

Add the exclude directive to the [main] section of /etc/yum.conf:

[main]
exclude=mysql*

The pattern mysql* makes yum ignore every package whose name starts with mysql.

Example: the MySQL Community Server archives are available at downloads.mysql.com.

Mastodon LLIMastodon SocialFosstodon