pacman –query Command Examples

“pacman –query” is an option for the pacman package manager in Arch Linux and its derivatives. It is used to query information about installed packages on the system.

This option allows the user to retrieve information about installed packages, including package names, versions, dependencies, and files. The user can also use this option to search for packages that match specific criteria, such as searching for all installed packages that contain a certain file or belong to a specific group.

pacman –query Command Examples

1. List installed packages and versions:

# pacman --query

2. List only packages and versions that were explicitly installed:

# pacman --query --explicit

3. Find which package owns a file:

# pacman --query --owns {{filename}}

4. Display information about an installed package:

# pacman --query --info {{package_name}}

5. List files owned by a package:

# pacman --query --list {{package_name}}

6. List orphan packages (installed as dependencies but not required by any package):

# pacman --query --unrequired --deps --quiet

7. List installed packages not found in the repositories:

# pacman --query --foreign

8. List outdated packages:

# pacman --query --upgrades

Summary

In summary, “pacman-mirrors” is a valuable tool for generating a new and up-to-date mirrorlist in Manjaro Linux and other Arch Linux-based distributions. By using it, the user can ensure that pacman downloads packages from the best available mirrors, resulting in faster and more reliable package installations and upgrades.

Related Post