Support >
  About independent server >
  Quick Linux Method of viewing installed software packages
Quick Linux Method of viewing installed software packages
Time : 2024-11-26 14:18:28
Edit : Jtti

What are the ways to view all files of installed packages in Linux? Mainly depends on the package management system currently used, the common package management and how to list all the files of the installed package are as follows!

In a Debian-based Linux distribution such as Ubuntu, you can use dpkg to list all the files of installed packages. Lists all the files for the installed package:

dpkg -L <package_name>

To see all the files installed in the curl package:

dpkg -L curl

The L option lists all files for the specified package. <package_name> is the name of the package you want to query.

The rpm command works with Red Hat-based distributions such as CentOS, RHEL, Fedora. Lists all the files for the installed package:

rpm -ql <package_name>

To see all the files installed in the curl package:

rpm -ql curl

q stands for query. l stands for listing files. <package_name> is the name of the package you want to query.

In the case of Arch Linux or a derivative such as Manjaro, the pacman package manager is available. Lists all the files for the installed package:

pacman -Ql <package_name>

View all files installed in the curl package:

pacman -Ql curl

Q Queries the installed software packages. l stands for listing files. <package_name> is the name of the package you want to query.

In modern versions of Fedora, CentOS, and RHEL, the dnf package manager replaces yum for managing packages. Lists all the files for the installed package:

dnf repoquery -l <package_name>

View all files installed in the curl package:

dnf repoquery -l curl

repoquery is a subcommand of dnf for querying software packages. The l option lists the files for the specified package.

openSUSE uses zypper to list all files for installed packages:

zypper info -t package <package_name>

View all files installed in the curl package:

zypper info -t package curl

If you don't know the specific package name, or want to see which package a file on your system belongs to, you can use dpkg to find out which package the file belongs to:

dpkg -S <file_name>

rpm Find which package the file belongs to:

rpm -qf <file_name>

pacman finds which package the file belongs to:

pacman -Qo <file_name>

dnf finds which package the file belongs to:

dnf provides <file_name>

zypper finds which package the file belongs to:

zypper search --installed-only <file_name>

locate is a database based tool that allows you to quickly locate files. To find out whether a file belongs to one of the installed packages, you can first find the location of the file with locate.

locate <file_name>

locate needs to update its database periodically, which can be done with the sudo updatedb command.

In summary, Debian/Ubuntu: uses dpkg -L <package_name>.

Red Hat/CentOS/Fedora: rpm -ql <package_name>.

Arch Linux: Uses pacman -Ql <package_name>.

Fedora/CentOS/RHEL (new version) : Use dnf repoquery -l <package_name>.

openSUSE: use zypper info -t package <package_name>.

Find the package to which the file belongs: Use the commands dpkg -S, rpm -qf, pacman -Qo, dnf provides, zypper search, etc.

These commands make it easy to list all the files for an installed package, or to find the package to which the file belongs.

JTTI-Defl
JTTI-COCO
JTTI-Selina
JTTI-Ellis
JTTI-Eom