List all software linux

3 Ways to List All Installed Packages in RHEL, CentOS and Fedora

One of the several duties of a system administrator is to install and manage software on a computer system-Linux in this case and in order keep track of installed/available software packages on your system, you can learn, and/or keep in mind a few quick commands.

In this article, we will explain how to list all installed rpm packages on CentOS, RHEL and Fedora distributions using four different ways.

1. Using RPM Package Manager

RPM (RPM Package Manager) formerly known as Red-Hat Package Manager is an open source, low-level package manager, which runs on Red Hat Enterprise Linux (RHEL) as well as other Linux such as CentOS, Fedora and UNIX systems.

You can compare it to DPKG Package Manager, the default packaging system for Debian and it’s derivatives such as Ubuntu, Kali Linux etc.

The following command will print a list of all installed packages on your Linux system, the flag -q meaning query and -a enables listing of all installed packages:

List All Installed Packages in CentOS

2. Using YUM Package Manager

YUM (Yellowdog Updater, Modified) is an interactive, front-end rpm based, package manager.

You can use the yum command below to list all installed packages on your system, one advantage with this method is, it includes the repository from which a package was installed:

Читайте также:  Anydesk linux установить пароль

Yum - List All Installed Packages

3. Using YUM-Utils

Yum-utils is an assortment of tools and programs for managing yum repositories, installing debug packages, source packages, extended information from repositories and administration.

To install it, run the command below as root, otherwise, use sudo command:

# yum update && yum install yum-utils

Once you have it installed, type the repoquery command below to list all installed packages on your system:

Repoquery - List All Installed Packages

To list installed packages from a particular repository, use the yumdb program in the form below:

# yumdb search from_repo base

List All Installed Packages from Repository

Read more about package management in Linux:

In this article, we showed you how to list all installed packages on CentOS or RHEL four different ways. Share your thoughts concerning this article via the feedback section below.

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Parted Command in Linux

TLDR Man Pages for Linux Commands

apt-get Command Examples

Ubuntu apt-cache Commands

apt Command Examples

Funny Linux Commands

3 thoughts on “3 Ways to List All Installed Packages in RHEL, CentOS and Fedora”

Hi. Since the release of Fedora 22, in which DNF became the new default packaging tool and therefore obsoleted yum command on subsequent Fedora OSs, YUM was kept on those Fedora OSs for compatibility reason regarding Linux distributions forked from the Fedora project (Red Hat, Centos) that kept on using YUM, and will be kept for that very reason until they adopt it definitively. I had little time before your previous post as reply, to test a command of my investigation that also relies as well on expression ‘wc -l‘ . Such command is likely to cover all current active repositories on a system which is indeed exactly what I was aiming to. Here are for comparative purpose the following commands (by the way, there is no need to be executed as user root): ‘dnf list installed|wc -l‘, ‘rpm -qa|wc -l‘ respective outputs: 1619, 1590. As noticeable those outputs are incorrect which is no surprise after investigation. Their subsequent commands are inappropriate; they do not reflect exclusively the current active repositories on my system, which in that case are fedora, updates which respectively contain 54 801, 13 085 packages (subsequent results are available from another command too). Good luck though in your hobby. Reply

Читайте также:  Syn flood kali linux

Hi. For Fedora, as output, the number (not the list) of all packages (available and installed) regarding a specific added repository . Regards. Reply

@Ricky You can pipe the output of the above commands to wc utility with the -l switch, to get the number instead of a list of installed packages, like this:

# yum list installed | wc -l OR # rpm -qa | wc -l

Источник

How do I list all installed programs?

Hm, I’m interested in Red Hat, Ubuntu, and cygwin. Is there a distribution-free way to list the programs with some command line argument?

4 Answers 4

That depends on your distribution.

  • Aptitude-based distributions (Ubuntu, Debian, etc): dpkg -l
  • RPM-based distributions (Fedora, RHEL, etc): rpm -qa
  • pkg*-based distributions (OpenBSD, FreeBSD, etc): pkg_info
  • Portage-based distributions (Gentoo, etc): equery list or eix -I
  • pacman-based distributions (Arch Linux, etc): pacman -Q
  • Cygwin: cygcheck —check-setup —dump-only *
  • Slackware: slapt-get —installed

All of these will list the packages rather than the programs however. If you truly want to list the programs, you probably want to list the executables in your $PATH , which can be done like so using bash’s compgen :

Or, if you don’t have compgen :

#!/bin/bash IFS=: read -ra dirs_in_path "; do for file in "$dir"/*; do [[ -x $file && -f $file ]] && printf '%s\n' "$" done done 

It would be better to distinguish between package managers instead of «distributions». NetBSD’s pkgsrc runs on any Linux, and some package managers can be used on multiple Uinces.

Answering the second part of the question (nothing really to be added to Chris’ answer for the first part):

There is generally no way of listing manually installed programs and their components. This is not recorded anywhere if you didn’t use a package manager. All you can do is find the binaries in standard locations (like Chris suggested) and in a similar way, guess where some libraries or some manual pages etc. came from. That is why, whenever possible, you should always install programs using your package manager.

Читайте также:  Чем лучше arch linux

Programs should be reachable via the PATH, so just list everything in the path:

Expect a result of about 3k-4k programs.

To exclude a probable minority of false positives, you may refine the approach:

for d in $ ; do for f in $d/* ; do test -x $f && test -f $f && echo $f done done 

It didn’t make a difference for me.

Источник

Оцените статью
Adblock
detector