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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. UNIX / Linux : Send mail with attachment using mutt
  2. route Command Examples in Linux
  3. ffmpeg: Video conversion tool
  4. doctl compute droplet: List, create, and delete virtual machines which are called droplets
  5. tail: command not found
  6. lnav Command Examples in Linux
  7. CentOS / RHEL 7 : How to boot into Rescue Mode or Emergency Mode
  8. alias: command not found
  9. Configure Network Bonding in Ubuntu Server
  10. How To Migrate Existing Iptables rules to Nftables In CentOS/RHEL 8

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright