Linux which rpm installed

5 ways to list installed packages in Linux

Do you ever need to know what packages are installed on your Linux system? Maybe you’re troubleshooting a problem and need to identify a package that’s causing an issue.

Or, maybe you want to install a new package and want to make sure there are no conflicts.

In any case, it’s helpful to know how to list installed packages in Linux. In this blog post, we will discuss 5 different ways to do just that!

apt list —installed
dpkt -l

On Redhat, Centos, and Fedora:

rpm -qa
yum list installed
dnf list installed

This article is part of the following series.

list installed packages with apt command in Ubuntu Linux

The first way to list installed packages in Linux is to use the apt command. This command is used for package management in Debian and Ubuntu systems.

To list installed packages with the apt command in Ubuntu Linux, follow these steps:

Open the terminal by pressing Ctrl+Alt+T or searching for “Terminal” in the Activities menu.

Run the following command to list all installed packages:

If you want to search for a specific package, you can use the following command. Replace with the name of the package you want to search for. apt list –installed | grep

apt list — -installed
Listing. Done
accountsservice/focal-updates,focal-security,now 0.6.55-0ubuntu12~20.04.5 amd64 [installed,automatic]
acpid/focal,now 1:2.0.32-1ubuntu1 amd64 [installed]
adduser/focal,now 3.118ubuntu2 all [installed,automatic]

In this example, each line of the output represents a single installed package.

acl/focal,now 2.2.53-6 amd64 [installed]

Property Value
Package Name acl
Repo Name focal
Status now installed
Version 2.2.53-6
Architecture amd64

The apt command can be used to install, remove, and update packages on Ubuntu system.

The apt command has a number of different options that you can use to mange packages.

For example, you can use the apt list –upgradable option to list all of the packages on your system that can be upgraded.

You can also use the apt search option to search for a specific package.

Simply type “apt search ” into your terminal and it will search for the package name that you specify.

If you want to see a description of a certain package, you can use the “apt show ” option. This will show you the description of the package and any other information that is available.

If you want to uninstall a package, you can use the “apt remove ” option.

list installed packages with dpkg command in Ubuntu Linux

Another way to list installed packages in Linux is to use the dpkg command.

Читайте также:  Linux kernel mainline ubuntu

dpkg is a package manager for Debian, Ubuntu and many other Linux distro. It is used to install/manage individual packages.

To use it, type dpkg -l into your terminal. This will list all of the installed packages on your system, as well as information about each package such as its version number and status.

ii accountsservice 0.6.55-0ubuntu12~20.04.5 amd64 query and manipulate user account information
ii acpid 1:2.0.32-1ubuntu1 amd64 Advanced Configuration and Power Interface event daemon
ii adduser 3.118ubuntu2 all add and remove users and groups

If you want to see a more detailed list of installed packages, you can use the dpkg -L command.

This will show you information about the files installed to your system .

difference between apt and dpkg command

APT Uses dpkg to Install Packages in the backend. With APT, you can retrieve a file from a remote repository and install it, all in one command.

This saves you from the work of manually finding and downloading the package before installation.

With dpkg, you can only install local files you’ve already downloaded yourself. It can’t search remote repositories or pull packages from them.

dpkg is a lower-level tool that handles the installation and management of individual .deb packages, while apt is a higher-level tool that provides more advanced package management functionality and works with packages from the Ubuntu repositories.

list installed packages with rpm command in Redhat Linux

The third way to list installed packages in Linux is to use the rpm command.

This command is used for package management on Red Hat and CentOS systems.

To use it, type rpm -qa into your terminal. This will list all of the installed packages on your system, including their version numbers and dependencies.

This command will display a list of all packages installed on the system in alphabetical order.

Each line in the output will show the package name followed by the version and release number, separated by a hyphen (-) character.

openssl-1.0.2k-19.el7.x86_64
openssh-clients-7.4p1-21.el7.x86_64
openssh-server-7.4p1-21.el7.x86_64

You can also use the rpm command with additional options to display more information about the installed packages, such as the package architecture, installation date, and package signature.

For example, you can use the following command to display the package name, version, architecture, and installation date:

This command will display the output in the following format:

openssl-1.0.2k-19.el7 x Fri 29 Jan 2021 01:02:43 PM EST
openssh-clients-7.4p1-21.el7 x Fri 29 Jan 2021 01:02:44 PM EST
openssh-server-7.4p1-21.el7 x Fri 29 Jan 2021 01:02:45 PM EST

If you want to see a more detailed list of installed packages, you can use the “rpm -ql ” command.

This will show you information about the specified package, including its location on your system and the files that it contains.

list installed packages with yum command in Redhat Linux

The fourth way to list installed packages in Linux is to use the yum command. This command is used for package management on Fedora and CentOS systems.

To use it, type “yum list installed” into your terminal.

This command will display a list of all packages installed on the system in alphabetical order, along with their version and release numbers, as well as the package repository they were installed from. For example:

Читайте также:  Linux fdisk partition type

openssl.x86_64 1:1.0.2k-19.el7 @rhel-7-server-rpms
openssh-clients.x86_64 7.4p1-21.el7 @rhel-7-server-rpms
openssh-server.x86_64 7.4p1-21.el7 @rhel-7-server-rpms

We can combine the yum command with the grep command to filter the output and search for specific packages.

yum list installed | grep packagename

You can modify the search term to match your desired package name or keywords.

If you want to see a more detailed list of installed packages, you can use the “yum info ” command.

difference between rpm and yum command in Linux

The main difference between RPM and YUM is that RPM is a low-level package management tool for individual RPM packages, while YUM is a high-level tool that provides a more advanced and automated package management experience, including dependency resolution and package group management.

YUM (Yellowdog Updater, Modified) is a package manager for RPM (Red Hat Package Manager) based Linux systems.

It is designed to manage the installation, removal, and updating of software packages along with their dependencies.

YUM automates the process of downloading and installing RPM packages from software repositories.

When a user requests the installation of a package, YUM automatically resolves and downloads any dependencies required by that package, ensuring that all dependencies are met before proceeding with the installation.

This makes the installation process more streamlined and efficient, as users do not need to manually download and install dependencies themselves.

RPM manages these files, tracks package installations and provides basic dependency management. However, it does not automatically download and install dependencies like YUM.

list installed packages with dnf command in Redhat Linux

The dnf command is the successor to yum and can also be used to list installed packages in Linux. To use it, type “dnf list installed” into your terminal.

As you can see, there are a few different ways to list installed packages in Linux. Which method you use will depend on your particular system. But, now that you know how, it should be a breeze! Try out each of these methods and see which one works best for you.

Do you have a preferred method for listing installed packages in Linux? Let us know in the comments below! And, as always, thanks for reading!

David is a Cloud & DevOps Enthusiast. He has years of experience as a Linux engineer. He had working experience in AMD, EMC. He likes Linux, Python, bash, and more. He is a technical blogger and a Software Engineer. He enjoys sharing his learning and contributing to open-source.

howtouselinux.com is dedicated to providing comprehensive information on using Linux.

We hope you find our site helpful and informative.

Источник

Installed an RPM file. Where to find the installed program? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

  • This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
  • This question does not appear to be about programming within the scope defined in the help center.
Читайте также:  Linux копирование файлов в папку

I have installed xmedcon-0.11.0-1.i686.rpm on my Fedora Linux machine. I ran the RPM file. Since I’m kind of new to Linux, I want to ask, where can I find the installed file and how can I run it?

It looks like you just need to type the command in terminal as described here: xmedcon.sourceforge.net/Docs/ProgramGUI . Also, chances are the RPM has added an item to some menu. Look for it.

This is off-topic for Stack Overflow. You might want to ask about this on Unix.SE or Super User (but search for it there first!).

2 Answers 2

$ rpm -ql xmedcon-0.11.0-1.i686 /etc/xmedconrc /usr/bin/medcon /usr/bin/xmedcon 

You will see all the files installed. The main files will be above. From command line run

In case you already know the command name, you can type which medcon in a terminal and it should tell you where the executable is located.

And as full.stack.xchg said, just typing the name of the executable on a command line (or finding it in the graphical menu) will start the program.

Hot Network Questions

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.14.43533

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Where do installed RPMs go?

I download and install packages on my Red Hat Enterprise Linux Server 6 machine using YUM package manager in command-line mode. When I install apk files on my Android phone, they go to /data/app directory, I am wondering where RHEL6 keeps its installed rpm files?

2 Answers 2

Yum maintains a cache of the RPMs it downloads here:

For example my box is Fedora 14, x86_64 architecture so I have the following:

$ ls /var/cache/yum/x86_64/14/ adobe-linux-i386 lamolabs rpmfusion-nonfree adobe-linux-x86_64 lamolabs-noarch rpmfusion-nonfree-debuginfo Dropbox nautilus-flickr-uploader rpmfusion-nonfree-rawhide-debuginfo fedora qm rpmfusion-nonfree-source . . 

But the RPMs that get installed are basically like a zip or tar file. So the contents of these files get dumped into the system and RPM maintains a database of what packages it has installed. The RPM «database» is located in this directory:

$ ls /var/lib/rpm Basenames __db.002 Dirnames Installtid Packages Pubkeys Sha1header Conflictname __db.003 Filedigests Name Providename Requirename Sigmd5 __db.001 __db.004 Group Obsoletename Provideversion Requireversion Triggername 

You can see where files get installed per each RPM with these commands.

what files are in an installed RPM

$ rpm -ql rpm /bin/rpm /etc/rpm /usr/bin/rpm2cpio /usr/bin/rpmdb /usr/bin/rpmquery /usr/bin/rpmsign /usr/bin/rpmverify /usr/lib/rpm /usr/lib/rpm/macros /usr/lib/rpm/platform /usr/lib/rpm/platform/amd64-linux . . 

package info about a given RPM

$ rpm -qi rpm Name : rpm Relocations: (not relocatable) Version : 4.8.1 Vendor: Fedora Project Release : 7.fc14 Build Date: Tue 04 Oct 2011 03:49:08 AM EDT Install Date: Tue 25 Oct 2011 09:36:34 AM EDT Build Host: x86-05.phx2.fedoraproject.org Group : System Environment/Base Source RPM: rpm-4.8.1-7.fc14.src.rpm Size : 2035701 License: GPLv2+ Signature : RSA/SHA256, Tue 04 Oct 2011 12:14:48 PM EDT, Key ID 421caddb97a1071f Packager : Fedora Project URL : http://www.rpm.org/ Summary : The RPM package management system Description : The RPM Package Manager (RPM) is a powerful command line driven package management system capable of installing, uninstalling, verifying, querying, and updating software packages. Each software package consists of an archive of files along with information about the package like its version, a description, etc. 

Источник

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