• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

pacman –query Command Examples

by Deepika

“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.

Filed Under: Linux

Some more articles you might also be interested in …

  1. needrestart: command not found
  2. sar: command not found
  3. lvdisplay Command Examples in Linux
  4. getcap Command Examples in Linux
  5. duc Command Examples in Linux
  6. cryptsetup: command not found
  7. How to Automate Startup/Shutdown of Oracle Database and Listener on Linux
  8. md5sum Command Examples in Linux
  9. getsebool Command in Linux
  10. How to create a networking bridge under CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright