
In this note i show how to make yum list all available versions of a specified package and how to instruct it to install the particular one.

Often it is required to install not the latest one, but some specific version or downgrade the already installed package to an older version. In CentOS systems you can list installed packages using the yum list installed and rpm -qa commands.įeel free to leave a comment if you have any questions.By default, yum installs the latest version of a package among the all versions available in enabled repositories. The output above shows that there are 603 packages installed. Utility to count the lines: sudo rpm -qa | wc -l 603 To find out how many packages are installed on your system, use the same command as before but instead of redirecting the output to a file, pipe it to the wc To install the same packages on another server you can use the catĬommand to pass all packages to yum: sudo yum -y install $(cat packages_list.txt) Count the number of installed packages #

To create a list of the names of all installed packages on your CentOS system and save it in a file named packages_list.txt, redirect the command output to the file: sudo rpm -qa > packages_list.txt To get more information about the queried package pass -i: sudo rpm -qi tmux Create a List of all Installed packages # Otherwise, the command will print: package tmux2is not installed If the package is installed, you will see something like this: 86_64 Package is installed on the system: sudo rpm -q tmux The following command will show you whether the tmux To query (search) whether a certain package is installed pass the package name to the rpm -q command. The following command will list of all installed packages: sudo rpm -qa

List Installed Packages with Rpm #Ĭommand with the -q option allows you to query the packages. Package is installed on the system you would run: sudo yum list installed | grep unzip unzip.x86_64 6.0-19.el7 output above shows that unzip version 6.0-19 is installed on the machine. You can try Uyuni or maybe Spacewalk 2.11 (nightly/unstable/beta) if that’s still available or the Oracle-version of Spacewalk.

Though YUM has a command-line interface, several other tools provide graphical user interfaces to YUM functionality. To find out whether a specific package is installed, filter the output with the grep If you run the command yum module list and there isn’t any modules listed, only a few and some message like ‘Fallback Module data used, then module data isn’t available for the AppStream-channel. The Yellowdog Updater, Modified (YUM) is a free and open-source command-line package-management utility for computers running the Linux operating system using the RPM Package Manager. Usually, the packages list is long, for better readability it is a good idea to pipe the output to less: sudo yum list installed | less
