Knowledgebase

How to roll back installed package(s) update?

Rolling back installed package updates depends on the package manager and the operating system you're using. Here are instructions for a few common package managers:

1. APT (Advanced Package Tool) - Debian/Ubuntu

  1. Open a terminal.

  2. View the history of package installations and upgrades:

    CSS

 

  • sudo apt list --installed | grep -i upgrade
  • Identify the package you want to downgrade.

  • Reinstall the specific version:

    Arduino

 

  1. sudo apt-get install package_name=version_number

2. Yum - CentOS/Red Hat

  1. Open a terminal.

  2. View the history of package installations and upgrades:

    bash

 

  • yum history list
  • Identify the transaction ID of the update you want to undo.

  • Undo the transaction:

    bash

 

  1. sudo yum history undo transaction_ID

3. DNF (Dandified Yum) - Fedora

  1. Open a terminal.

  2. View the history of package installations and upgrades:

    bash

 

  • sudo dnf history list
  • Identify the transaction ID of the update you want to undo.

  • Undo the transaction:

    bash

 

  1. sudo dnf history undo transaction_ID

4. Pacman - Arch Linux

  1. Open a terminal.

  2. View the history of package installations and upgrades:

    CSS

 

  • sudo pacman -Q
  • Identify the package you want to downgrade.

  • Reinstall the specific version:

    bash

 

  1. sudo pacman -U /var/cache/pacman/pkg/package_name-version.pkg.tar.xz

5. Homebrew - macOS

  1. Open a terminal.

  2. View the history of package installations and upgrades:

    bash

 

  • brew log package_name
  • Identify the commit ID or version you want to revert to.

  • Revert to a specific version:

    bash

 

  1. cd $(brew --repo package_name) git checkout commit_id brew install package_name

Please note that rolling back updates may have unintended consequences, especially if the updated package introduces critical security fixes or bug patches. It's generally recommended to consider the implications before rolling back updates.

  • 0 Users Found This Useful
Was this answer helpful?