Install, Update, and Remove RPMs Using Yum (2024)

  1. Ensure that the compute node on which you want to perform yum updates has been prepared, as described in Prepare the Compute Nodes for Yum Updates.
  2. Install, update, or remove RPMs as follows:
    • To install an RPM from the yum repository, run the following command:

      # yum install rpm_name
    • To update a specific RPM, run the following command:

      # yum update rpm_name
    • To update all the RPMs, run the following command:

      # yum update
    • To remove an RPM, run the following command:

      # yum remove rpm_name

For the yum update or yum remove command, if you specify an RPM that is in the exclusion list defined earlier, the command will fail.

Install, Update, and Remove RPMs Using Yum (2024)

FAQs

How to update RPM using yum? ›

Install, update, or remove RPMs as follows:
  1. To install an RPM from the yum repository, run the following command: # yum install rpm_name.
  2. To update a specific RPM, run the following command: # yum update rpm_name.
  3. To update all the RPMs, run the following command: # yum update.

How to uninstall RPM using yum? ›

Scenario #1: Remove a Software Package from CentOS Using YUM
  1. # yum remove [package_name]
  2. # yum erase [package_name]
  3. # yum autoremove [package_name]
  4. # vi /etc/yum.conf.
  5. directive clean_requirements_on_remove=1.
  6. # yum list installed | grep [search_term]
  7. # rpm -qa | grep [search_term]
Mar 4, 2024

Can you delete RPM file after install? ›

To delete a package, use "rpm -e packagename. rpm." You can use other flags with the rpm command to test installations, specify install paths, and more.

What is the difference between RPM install and yum install? ›

While RPM is the packaging format, yum is the command you will use to do the installation. For example, yum will resolve and download the dependencies for the package you want to install; rpm will simply complain if you want to install a package that does not have all its dependencies installed.

Can I use yum to install rpm? ›

The yum package manager is an alternative method to install RPM files. yum is still used in Linux distributions before RHEL 8, but for newer versions and most current distributions, dnf has taken its place. Replace [path_to_rpm_file] with the path to the RPM file on your system.

How do I update RPM? ›

To update RPM packages, you can simply use a package manager like rpm with -U option or yum and dnf with the update command. If you use the rpm package manager then use rpm -U [package _name] . While using yum and dnf package manager, use the yum update and dnf update command respectively.

How to remove installed RPM in Linux? ›

Uninstall the RPM or DEB
  1. Login as root. You must be root to uninstall the RPM or DEB.
  2. You must use the full name. ...
  3. Uninstall the RPM or DEB with the following command: rpm -e <rpm_name> /* for RPM */ dpkg -P <deb_name> or dpkg --purge <deb_name> /* for DEB */

What is the difference between yum update and yum upgrade? ›

The Yum update command is used to update all the installed packages. Yum upgrade command upgrades the installed packages more aggressively. It only updates the existing packages by replacing the old versions. This command upgrades packages by removing the old ones.

How to update RPM package in Linux? ›

rpm package we use the rpm command with -i option or --install option(both works fine) which tells the command that we are installing a new package. We should always use this for kernel installations. To update an already installed software using the rpm command, we use the -U option or --upgrade option.

How to remove RPM without dependencies? ›

The first “rpm -qa” lists all RPM packages and the grep finds the package you want to remove. Then you copy the entire name and run the “rpm -e –nodeps” command on that package. It will, without prompting for confirmation, remove that package but none of its dependencies.

How to install and remove packages with RPM command in Linux? ›

Modes of RPM Command
  1. Install: This mode is used for installing the RPM packages.
  2. Remove: It is used for erasing, removing, or uninstalling the RPM packages.
  3. Upgrade: It is used for updating the available RPM packages.
  4. Verify: This mode is used for verifying the RPM packages.

Should I use RPM or yum? ›

YUM is a much better option than RPM when performing a batch installation. Since YUM utilizes online repositories, it only requires the package names. YUM installs the packages and the necessary dependencies automatically. The utility installs the MySQL server and resolves all dependencies automatically.

What is the main advantage in using yum over RPM? ›

YUM performs dependency resolution when installing, updating, and removing software packages. YUM can manage packages from installed repositories in the system or from . rpm packages.

What does yum stand for? ›

“YUM” is an acronym that stands for “Yellowdog Updater, Modified”. This name harkens back to YUM's origins as a rewrite of Yellowdog UPdater (also known as “YUP”), a software updater for Yellow Dog Linux, a now-defunct Linux distribution.

How to upgrade a package using yum? ›

To update a specific package using “yum”, follow the steps below:
  1. Open the terminal on your RHEL.
  2. Run the following command. sudo yum update firefox.x86_64. ...
  3. Enter the user password to prove identity. ...
  4. Press 'Y' to continue the update process.
Feb 27, 2024

How to update packages in Linux using yum? ›

Update System

To update all packages in the system and their dependencies, run this command: yum update. If you want to update security-related packages only, issue the following command: yum update --security.

How to install rpm locally with yum? ›

How to install RPM local package with yum? To install a local package in any Red Hat-based Linux system like RHEL, Fedora, and CentOS at first move to the download folder using cd Download/ then run sudo yum localinstall filename. rpm or you can just run sudo yum localinstall path/filename. rpm in the terminal.

How do I update my yum list? ›

Upgrading Packages
  1. Use the following command to update your installed packages: sudo yum update. ...
  2. You can list the installed packages for which updates are available using the following command: sudo yum list updates.
  3. To update a specific package, use the update command.
May 21, 2021

Top Articles
Latest Posts
Article information

Author: Merrill Bechtelar CPA

Last Updated:

Views: 6127

Rating: 5 / 5 (70 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Merrill Bechtelar CPA

Birthday: 1996-05-19

Address: Apt. 114 873 White Lodge, Libbyfurt, CA 93006

Phone: +5983010455207

Job: Legacy Representative

Hobby: Blacksmithing, Urban exploration, Sudoku, Slacklining, Creative writing, Community, Letterboxing

Introduction: My name is Merrill Bechtelar CPA, I am a clean, agreeable, glorious, magnificent, witty, enchanting, comfortable person who loves writing and wants to share my knowledge and understanding with you.