Discussion:
[arch-general] Pacman: Remove unneded dependencies
L. Rose
2017-01-24 14:10:01 UTC
Permalink
Hi,

I know, this is probably a very common question, but I couldn't find any
information on the pacman wiki article about that, so I have to ask. How
can I uninstall all packages on my system, which have been installed as
a dependency, and aren't needed any longer? (Because I've uninstalled
the dependent package or because the dependent package no longer depends
on that dependency)

I've read about pacman -Qe, but this lists packages I've explicitly
installed and don't want to remove. And please, don't just point to the
wiki article, I've checked that already.

Thanks in advance,

Lukas
Phil Wyett via arch-general
2017-01-24 14:17:41 UTC
Permalink
Post by L. Rose
Hi,
I know, this is probably a very common question, but I couldn't find any
information on the pacman wiki article about that, so I have to ask. How
can I uninstall all packages on my system, which have been installed as
a dependency, and aren't needed any longer? (Because I've uninstalled
the dependent package or because the dependent package no longer depends
on that dependency)
I've read about pacman -Qe, but this lists packages I've explicitly
installed and don't want to remove. And please, don't just point to the
wiki article, I've checked that already.
Thanks in advance,
Lukas
Orphans.

pacman -Rns $(pacman -Qtdq)

https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Removing_un
used_packages_.28orphans.29

Regards

Phil
--
Play the game, for the games sake.

OS of choice: GNU / Linux

Distribution of choice: Arch / Antergos

GitHub: https://github.com/philwyettreb

Intsant Messaging (XMPP): ***@chatme.im
Bruno Pagani via arch-general
2017-01-24 14:18:00 UTC
Permalink
Post by L. Rose
Hi,
I know, this is probably a very common question, but I couldn't find any
information on the pacman wiki article about that, so I have to ask. How
can I uninstall all packages on my system, which have been installed as
a dependency, and aren't needed any longer? (Because I've uninstalled
the dependent package or because the dependent package no longer depends
on that dependency)
I've read about pacman -Qe, but this lists packages I've explicitly
installed and don't want to remove. And please, don't just point to the
wiki article, I've checked that already.
Not enough apparently, because it’s in it.

You’ve also got --help and the man page to help you. ;)

Regards,
Bruno
Ista Zahn via arch-general
2017-01-24 14:20:34 UTC
Permalink
On Jan 24, 2017 9:10 AM, "L. Rose" <***@lrose.de> wrote:

Hi,

I know, this is probably a very common question, but I couldn't find any
information on the pacman wiki article about that, so I have to ask. How
can I uninstall all packages on my system, which have been installed as
a dependency, and aren't needed any longer? (Because I've uninstalled
the dependent package or because the dependent package no longer depends
on that dependency)

I've read about pacman -Qe, but this lists packages I've explicitly
installed and don't want to remove. And please, don't just point to the
wiki article, I've checked that already.


Check again under
https://wiki.archlinux.org/index.php/Pacman#Querying_package_databases
(look for "orphan").

Best,
Ista



Thanks in advance,

Lukas
Ralf Mardorf
2017-01-24 14:21:31 UTC
Permalink
Hi,

you've got a German email address, perhaps this Wiki does help:

https://wiki.archlinux.de/title/pacman#Anwendung

Take a look at

"pacman -Rs [paket] Paket mit allen benötigten Abhängigkeiten
entfernen (wenn diese nicht von anderen
installierten Paketen benötigt werden)

pacman -Rss [paket] Paket mit allen benötigten Abhängigkeiten
und deren Abhängigkeiten entfernen"

Regards,
Ralf
Ralf Mardorf
2017-01-24 14:26:51 UTC
Permalink
Post by Ralf Mardorf
Hi,
https://wiki.archlinux.de/title/pacman#Anwendung
Take a look at
"pacman -Rs [paket] Paket mit allen benötigten Abhängigkeiten
entfernen (wenn diese nicht von anderen
installierten Paketen benötigt werden)
pacman -Rss [paket] Paket mit allen benötigten Abhängigkeiten
und deren Abhängigkeiten entfernen"
Regards,
Ralf
PS: To see if a package is needed by another package

pactree -r

could be useful.

Loading...