How to find out an apps package name?

So I wanna learn the Termina and I really don’t want to use Pamac but I’m still not that good with it so I hope you can help a newbie out. I got several apps installed. I tried to uninstall some of them but it seems like yay -R (name) is not working because the name of the app is not the name of the package. So how do I find out the package name of the app so I can uninstall it? I used Pamac for this in the past but I don’t want to use a GUI for this anymore.

Example: QT Assistant, QT Designer, QT Linguist and QT Bus Viewer have been installed on my system.

  1. does anybody know what packages need them? I don’t know what packages installed those. Could it be Steam? I’m asking because I don’t remember installing them on my own.

  2. So I want to uninstall them. What’s the best way of finding their names the easy, terminal way and how do I know that some apps won’t need those apps?

1 Like

pactree -r <packagename>

Have you had a look at this?i
https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Listing_packages

I’m not an expert but it might help, think there is also a video using pacman here

Another ‘trick’ is to use yay to show you what is present. If you try yay qt (or pacman -Ss qt) you will get a PILE of possibilities, but only those you have installed will say so beside their name. Just take note of those names, and try to uninstall them…

Just adding a bit to what @freebird54 said:

pacman -Ss qt | grep installed

3 Likes

You can also right click the app icon and select to edit its command. There you’ll see exactly the command name.

Then you can use command

pacman -Qo <commandname>

to see which package it belongs.

2 Likes

Those are all part of qt5-tools and/or qt6-tools depending on which you have installed. You can use pactree as described above by @daab to see if you need them.

There are quite a lot of ways:

  • pacman -Qs qt
  • pacman -Q | grep qt
  • pacman -Qo <filename from package>
  • If you have it installed you can use pkgfile
  • Probably more :slight_smile:

You don’t need to search the entire repos and then get the installed ones. The same commands with pacman -Q instead of pacman -S will search your installed packages.

3 Likes

The only difficulty I see with the -Q version of the command is that it seems to find a LOT more entries, even though qt is specified as a search term (on my system).

  1. pacman -Ss qt | grep installed 41 entries
  2. pacman -Qs qt 84 entries

Not sure why this should be, but the descriptions seem not all to be qt related in the -Q version of the command. Still makes quite a lst to go through though! Is there a command tweak to locate the meta-packages (or whatever they’re called) that probably got them installed originally?

That is because by grepping for “installed”, you are removing the package descriptions.

If you don’t want the descriptions you could use pacman -Qsq qt or pacman -Q | grep qt

Still a bit confusing - as the descriptions were there before the grep command - and the -Q was already only looking in installed pkgs, right? Regardless, it does reduce the count a lot - to 42. Just not getting my head around entries like:

local/zbar 0.23.1-9
    Application and library for reading bar codes from various sources

as I don’t see any qt references there…

Oh well - learning as I go… :grin:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.