Qp - query packages

qp - Query Packages. A CLI util to query installed packages on Arch Linux and Arch-based Linux distros, written in Go.

The program has many options for querying packages.

Available from AUR or Mabox repo:

yay -S qp

A very useful command for me:

$ qp -l 20 -O size:asc --no-headers |tac
2025-03-18  linux-firmware     explicit    709.65 MB
2025-03-05  wesnoth            explicit    539.56 MB
2025-03-30  libreoffice-fresh  explicit    412.27 MB
2025-04-16  chromium           explicit    334.10 MB
2025-04-17  firefox            explicit    254.05 MB
2025-04-12  thunderbird        explicit    241.51 MB
2025-03-05  gcc                explicit    202.43 MB
2025-02-05  virtualbox         explicit    190.89 MB
2025-03-30  mariadb            explicit    189.55 MB
2025-03-05  boost              dependency  181.34 MB
2025-04-12  inkscape           explicit    173.79 MB
2025-04-12  linux612           explicit    144.69 MB
2025-03-30  gimp               explicit    144.45 MB
2025-03-05  gcc-libs           explicit    143.50 MB
2025-04-12  linux61            explicit    143.34 MB
2025-02-04  llvm-libs          dependency  134.51 MB
2025-04-12  webkit2gtk-4.1     dependency  126.21 MB
2025-04-12  webkit2gtk         dependency  126.17 MB
2024-03-13  ghc-libs           dependency  123.26 MB
2025-04-12  webkitgtk-6.0      dependency  122.88 MB

Shows the 20 largest installed packages.

2 Likes

Is this a replacement for expac ?

expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -20

:bird:

No idea, never used expac.

napcok@mabox ~ $ expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -20
bash: expac: command not found

Installed expac, but your command seems to show 20 latest installed packages not largest :wink:

I like to list the biggest installed packages from time to time.
yay -Ps shows only ten biggest.
Few days ago I realized I have few electron versions installed… I don’t remember why as I do not use anything electron based. So having qp may be handy to look and remove some big packages once in a while.

1 Like

HAHAHAh oeps :poop:

expac is a leftover from arcolinux alias rip.

Don’t know if it can filter on size…

extra/expac 10-11 [installed]
    alpm data (pacman database) extraction utility

:bird:

It can filter on size

expac -H M '%-20n\t%10m' | sort -rhk 2 | head -n 20
1 Like

Hey, I’m the qp dev! Thanks for the mention!

Just a heads up, on the 21st (tomorrow) I’ll be rolling out a new command-based syntax and the flag-based syntax will be deprecated (not immediately, so scripts won’t break). I’m starting to reach the limits of what flags can do without the shell exploding, so a fully expressive language is in the works.

The equivalent of your command in the new syntax would be:

$ qp order size:asc limit 20 --no-headers

Shorthand would be:

$ qp o size:asc l 20 --no-headers

I noticed that you piped the output into tac, does that mean a tail:n or end:n modifier to limit would be useful to you?

For example:

$ qp o size:asc l end:20 --no-headers

Thanks again, I appreciate it!

2 Likes

Hi @Zweih, welcome to the forum :slight_smile:
I was looking for a way to list the largest installed packages in a way similar to yay -Ps, but I needed more than just 10. I didn’t know expac and that’s how I found your tool :slight_smile:

I see that qp is in a phase of rapid development.
Thanks for developing this handy utility.