• Webconn Technology
    • GPU Server
      • Dedicated GPU Servers with NVIDIA RTX/A100 GPUs for accelerated AI training, rendering, and scientific computing. Features CUDA cores, 24GB-141GB VRAM, and parallel processing. Pre-configured with TensorFlow/PyTorch.

      • nvidia rtx A6000
    • Dedicated Server
      • Experience blazing-fast speeds & ironclad security with your own dedicated server. No shared resources. Fully customizable plans for gaming, e-commerce, and big data. Start now!

      • datacenter
    • Shared Hosting
      • Get user-friendly DirectAdmin shared hosting for your website. Enjoy an intuitive control panel, one-click app installs, and reliable performance. Perfect for blogs, small business sites, and portfolios.

      • shared hosting web
    • Domains
      • Search and register the perfect domain name for your website. Get a memorable .com, .net, .org or niche TLD to start building your brand online. Includes free privacy protection.

    • VPS
      • Experience the power of a dedicated server without the high cost. Our VPS hosting guarantees CPU, RAM, and storage for your site, ensuring optimal performance and stability.

      • data center
  • Blog
  • Dashboard

How to roll back an update using yum in CentOS & AlmaLinux

Rollback an update using yum as follows. As an example, we will be using the install and rollback of the screen package.

Note that it is not possible to rollback selinux, selinux-policy-*, kernel, or glibc (dependencies of glibc such as gcc) packages to a previous version. Downgrading a system to a minor version is not recommended as this might leave the system in an undesired state.

  • The screen tool can be installed and uninstalled using yum in the following example.

# yum install screen

  • The next step is to locate the transaction ID for which a ‘undo’ is desired.
  • The transaction ID we’re looking for is ‘8,’ so go ahead and undo the step. Use yum history info 8 before doing the undo if you want to view more details to make sure this is the transaction you want to undo.
  • Enter the following command to undo transaction 8.

# yum history undo 8

It is always recommended to perform a full system backup before installing any update, and yum history is not intended to replace system backups.

It’s always a good idea to document the state of the system before and after patching. This should include using the --orphans, --problems, --dupes, and --leaves flags with package-cleanup.

yum history undo will require access to all earlier RPM versions; as a result, the system must have access to the older RPM versions.

It is suggested that you carefully review the output of package-cleanup --orphans before doing updates to determine which currently installed RPMs are no longer available in the enabled repositories.

Using CentOS’s regular repositories shouldn’t be an issue because several RPM versions are kept in these places.

Check the yum output/logs for any messages and rpmnew, orig, save files created after making any RPM modifications.

Comments

Leave a Reply