Is there an easier way to uninstall packages in Arch Linux?

8,371

Yes.

Linux has a lot of options, for Arch you are using pacman; (the following code is an example only)

  • Wildcards let you pacman -Rs '.*icon.*'
  • History of your commands will let you pacman -Rs $(history | grep icon | perl -pe 's/.* //g')
  • More specific history in /var/log/pacman.log
  • There are 5 GUI front ends and more for AUR
  • pacman -Qs '.*icon.*' will list installed packages with icon in the name
  • pacman -Qo path/to/file will tell you what package a file (like a menu item belongs to)

If a good installer or package manager was not used one can't expect the system to offer an uninstall option.

Share:
8,371

Related videos on Youtube

Rtsne42
Author by

Rtsne42

Updated on September 18, 2022

Comments

  • Rtsne42
    Rtsne42 almost 2 years

    I recently installed about 20 different icon and theme packages from Arch repository. After testing them I decided to remove most of them. However, it took me at least 15 minutes to find the exact spelling of the packages I installed and where I got them from. Something that would take me less than a minute on any other OS now became a major pain. Is there an easier way to uninstall packages in Arch Linux? Or a GUI alternative? Especially when you don't remember the package name or how you installed it.

  • Rtsne42
    Rtsne42 almost 8 years
    Great, thanks. The history bit is really useful. With the GUI I was thinking more in terms of packages installed from AUR or even makepkg, not just pacman. I'd love to have a GUI that allows me to uninstall all the packages that were installed not just the pacman ones, like say in Windows.
  • Rtsne42
    Rtsne42 almost 8 years
    Already upvoted but it's a new account so doesn't show. True, I wouldn't expect to uninstall something on windows that wasn't installed with .exe but I still wonder, clearly the system can recognise when an application is installed since it appears in the application menu. But why can't I say just right click the icon and do 'Uninstall' instead of looking through pages of history for exact spelling.
  • user1133275
    user1133275 almost 8 years
    @dcweaver01 see the updated answer for how to find the package of a menu item.
  • Suuuehgi
    Suuuehgi over 3 years
    The wildcards either don't work at all for me or don't result in usable output. The only thing working for me is pacman -Q | grep whatever. E.g. pacman -R $(pacman -Q | grep -E '^python2' | awk '{print $1}')