10

I'm using pacman 5.0.1 on Arch Linux and I'd like to get information about packages installed on my machine as well as packages in the remote repositories.

Information should include a description of the package, its size, and its build date.

  • I don't get it, you asked this question not even one minute before you answered it yourself. You seem to do that a lot, is that just to increase your reputation artificially? – RedGlyph Feb 1 at 12:21
  • @RedGlyph: This site also encourages answering one's own questions, see this checkbox from the "Answer Question" form. You're right, I've made a habit out of publishing the solutions I found to the questions I had. I do this in order for others to profit from my endeavors and for myself since this documents my solutions. It doesn't increase my reputation artificially, instead, other people vote on my Q&As if they found them useful, that's how reputation is increased. – Matthias Braun Feb 1 at 13:04
  • That's interesting. That looked a little weird on a question-based site, but why not? Thanks for the info! – RedGlyph Feb 2 at 10:31
  • I'm happy to have cleared things up! :-) There's actually a common school of thought behind my way of using Stack Exchange, from the SO Tour: ... we're working together to build a library of detailed answers to every question about programming – Matthias Braun Feb 2 at 11:36
19

Using --info

Taking vi as an example, to get information about its locally installed package use

pacman -Q --info vi

This produces

Name            : vi
Version         : 1:070224-2
Description     : The original ex/vi text editor
Architecture    : x86_64
URL             : http://ex-vi.sourceforge.net/
Licenses        : custom:ex
Groups          : base
Provides        : None
Depends On      : ncurses
Optional Deps   : s-nail: used by the preserve command for notification [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 290.00 KiB
Packager        : Evangelos Foutras <evangelos@foutrelis.com>
Build Date      : Sun 06 Sep 2015 09:34:15 PM CEST
Install Date    : Mon 03 Oct 2016 07:18:13 PM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Alternatively use the shorter -i flag:

pacman -Qi vi

Getting information from the remote repository works similar:

pacman -Si vi

When you only know parts of the package's name, use the -s parameter:

pacman -Ss jdk

To find out which packages depend on a certain package — for example if you're wondering why a package exists on your system — you can use pactree:

pactree -r intel-media-driver

which produces a nice dependency tree:

intel-media-driver
└─intel-media-sdk
  └─ffmpeg
    ├─electron6
    │ └─code
    ├─firefox
    ├─freerdp
    │ └─wlroots
    │   └─sway
    ├─qt5-webengine
    │ └─python2-pyqtwebengine
    │   └─calibre
    ├─unpaper
    │ └─ocrmypdf
    ├─vlc
    └─wf-recorder-git
|improve this answer|||||
  • The -i flag produces to much output per package. What if you just a one line description? – Björn Lindqvist Mar 28 at 1:36
  • To only get the package's description, you can use pacman -Qi vi | grep -Po '(?<=^Description).*' | sed "s/^\s*: //". Does this work for you? – Matthias Braun Mar 29 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.