Skip to content

This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!





Table of contents


System update

# yum check-update
# yum update

Prevent packages from being updated

Sometimes you may want to restrict a package from being updated to a newer version. The Yum plugin versionlock allows you to lock packages to a specific version. The plugin is not installed by default so first, you will need to install it:

$ sudo install yum-plugin-versionlock

During the installation two configuration files will be created on your system, stored in the /etc/yum/pluginconf.d directory. The configuration file versionlock.conf and the file versionlock.list containing the locked packages. By default, no packages are listed in this file.

To lock a version of a package you can either manually add the package name in the file or use the $ yum versionlock command followed by the package name. For example, to prevent all PHP packages (all packages starting with php-) from being updated you would run:

sudo yum versionlock php-*

If this cheat sheet has been useful to you, then please consider leaving a star here.