Hello,
I come from Manjaro and in Pamac there is the function under Installed → Orphaned. There you can have all orphaned packages listed with just one click.
I got to know the function when I had a problem with a system update. I don’t remember what it was, but some package was supposed to be updated and that didn’t work properly, instead causing the RAM to slowly fill up and the system then hang. As it turned out, the “faulty” package was no longer needed and was listed right there under Orphaned on Pamac.
If I had removed the package there before the system update, I would not have fallen into this trap in the first place.
Since then, I have always used Pamac in such a way that I usually checked for orphaned packages immediately after an update and then uninstalled them if necessary.
You read a lot of bad things about Pamac here, but I have to say that this function served me well for about 1.5 years and never led to an error.
Now I wanted to see what the alternative would be under Pacman in EndeavorOS.
I found the following two commands:
Find/List Orphaned Packages:
pacman -Qdt
Remove:
sudo pacman -Rsn $(pacman -Qdtq)
The latter command is also controversially discussed!
And, since I don’t want to destroy my system right away, I wanted to get to the bottom of the matter a little more carefully before I let the command become routine.
To do this, I simply empirically compared how Pacman vs. Pamac behaved in the VM.
First of all, here is the output of Pacman (it’s actually self-explanatory):
[john@john ~]$ pacman -Qdt
appstream-glib 0.8.2-3
asciidoc 10.2.0-3
boost 1.83.0-1
cmake 3.27.4-1
gendesk 1.0.9-3
go 2:1.21.0-1
go-tools 4:0.12.0-1
gobject-introspection 1.76.1-3
gtest 1.13.0-1
itstool 1:2.0.7-1
kjs 5.109.0-1
lua52 5.2.4-5
meson 1.2.1-1
python-docutils 1:0.20.1-1
vala 0.56.13-1
[john@john ~]$ sudo pacman -R $(pacman -Qdtq)
[sudo] Passwort für john:
Abhängigkeiten werden geprüft …
Paket (15) Alte Version Netto-Veränderung
appstream-glib 0.8.2-3 -3,74 MiB
asciidoc 10.2.0-3 -2,41 MiB
boost 1.83.0-1 -178,93 MiB
cmake 3.27.4-1 -71,14 MiB
gendesk 1.0.9-3 -6,40 MiB
go 2:1.21.0-1 -201,62 MiB
go-tools 4:0.12.0-1 -87,53 MiB
gobject-introspection 1.76.1-3 -13,16 MiB
gtest 1.13.0-1 -2,11 MiB
itstool 1:2.0.7-1 -0,09 MiB
kjs 5.109.0-1 -1,53 MiB
lua52 5.2.4-5 -0,92 MiB
meson 1.2.1-1 -13,09 MiB
python-docutils 1:0.20.1-1 -5,72 MiB
vala 0.56.13-1 -14,39 MiB
Gesamtgröße der entfernten Pakete: 602,77 MiB
:: Möchten Sie diese Pakete entfernen? [J/n] n
[john@john ~]$ sudo pacman -Rs $(pacman -Qdtq)
Abhängigkeiten werden geprüft …
:: gdk-pixbuf2 benötigt optional libheif: Load .heif, .heic, and .avif
:: glibc benötigt optional gd: for memusagestat
:: gperftools benötigt optional graphviz: pprof graph generation
:: groff benötigt optional netpbm: for use together with man -H command interaction in browsers
:: imagemagick benötigt optional libheif: HEIF support
:: libwbclient benötigt optional python-markdown: for samba-tool domain schemeupgrade
:: lv2 benötigt optional python-lxml: for lv2specgen.py
:: lv2 benötigt optional python-markdown: for lv2specgen.py
:: lv2 benötigt optional python-pygments: for lv2specgen.py
:: smbclient benötigt optional python-markdown: for samba-tool domain schemeupgrade
Paket (36) Alte Version Netto-Veränderung
cppdap 1.58.0-1 -1,62 MiB
docbook-xml 4.5-9 -1,96 MiB
docbook-xsl 1.79.2-7 -26,32 MiB
gd 2.3.3-7 -0,67 MiB
glib2-docs 2.76.5-1 -21,82 MiB
graphviz 8.1.0-2 -11,28 MiB
gsfonts 20200910-3 -3,11 MiB
gtk-doc 1.33.2-3 -2,40 MiB
gts 0.7.6.121130-2 -0,67 MiB
jsoncpp 1.9.5-2 -0,73 MiB
libheif 1.16.2-1 -1,02 MiB
netpbm 10.73.43-1 -6,78 MiB
ninja 1.11.1-3 -0,35 MiB
python-lxml 4.9.2-3 -5,08 MiB
python-mako 1.2.4-3 -1,01 MiB
python-markdown 3.4.4-1 -0,96 MiB
python-markupsafe 2.1.3-1 -0,08 MiB
python-pygments 2.16.1-1 -13,80 MiB
python-tqdm 4.66.1-1 -0,65 MiB
python-typing_extensions 4.7.1-1 -0,37 MiB
rhash 1.4.3-1 -0,32 MiB
appstream-glib 0.8.2-3 -3,74 MiB
asciidoc 10.2.0-3 -2,41 MiB
boost 1.83.0-1 -178,93 MiB
cmake 3.27.4-1 -71,14 MiB
gendesk 1.0.9-3 -6,40 MiB
go 2:1.21.0-1 -201,62 MiB
go-tools 4:0.12.0-1 -87,53 MiB
gobject-introspection 1.76.1-3 -13,16 MiB
gtest 1.13.0-1 -2,11 MiB
itstool 1:2.0.7-1 -0,09 MiB
kjs 5.109.0-1 -1,53 MiB
lua52 5.2.4-5 -0,92 MiB
meson 1.2.1-1 -13,09 MiB
python-docutils 1:0.20.1-1 -5,72 MiB
vala 0.56.13-1 -14,39 MiB
Gesamtgröße der entfernten Pakete: 703,77 MiB
:: Möchten Sie diese Pakete entfernen? [J/n] n
[john@john ~]$ sudo pacman -Rsn $(pacman -Qdtq)
Abhängigkeiten werden geprüft …
:: gdk-pixbuf2 benötigt optional libheif: Load .heif, .heic, and .avif
:: glibc benötigt optional gd: for memusagestat
:: gperftools benötigt optional graphviz: pprof graph generation
:: groff benötigt optional netpbm: for use together with man -H command interaction in browsers
:: imagemagick benötigt optional libheif: HEIF support
:: libwbclient benötigt optional python-markdown: for samba-tool domain schemeupgrade
:: lv2 benötigt optional python-lxml: for lv2specgen.py
:: lv2 benötigt optional python-markdown: for lv2specgen.py
:: lv2 benötigt optional python-pygments: for lv2specgen.py
:: smbclient benötigt optional python-markdown: for samba-tool domain schemeupgrade
Paket (36) Alte Version Netto-Veränderung
cppdap 1.58.0-1 -1,62 MiB
docbook-xml 4.5-9 -1,96 MiB
docbook-xsl 1.79.2-7 -26,32 MiB
gd 2.3.3-7 -0,67 MiB
glib2-docs 2.76.5-1 -21,82 MiB
graphviz 8.1.0-2 -11,28 MiB
gsfonts 20200910-3 -3,11 MiB
gtk-doc 1.33.2-3 -2,40 MiB
gts 0.7.6.121130-2 -0,67 MiB
jsoncpp 1.9.5-2 -0,73 MiB
libheif 1.16.2-1 -1,02 MiB
netpbm 10.73.43-1 -6,78 MiB
ninja 1.11.1-3 -0,35 MiB
python-lxml 4.9.2-3 -5,08 MiB
python-mako 1.2.4-3 -1,01 MiB
python-markdown 3.4.4-1 -0,96 MiB
python-markupsafe 2.1.3-1 -0,08 MiB
python-pygments 2.16.1-1 -13,80 MiB
python-tqdm 4.66.1-1 -0,65 MiB
python-typing_extensions 4.7.1-1 -0,37 MiB
rhash 1.4.3-1 -0,32 MiB
appstream-glib 0.8.2-3 -3,74 MiB
asciidoc 10.2.0-3 -2,41 MiB
boost 1.83.0-1 -178,93 MiB
cmake 3.27.4-1 -71,14 MiB
gendesk 1.0.9-3 -6,40 MiB
go 2:1.21.0-1 -201,62 MiB
go-tools 4:0.12.0-1 -87,53 MiB
gobject-introspection 1.76.1-3 -13,16 MiB
gtest 1.13.0-1 -2,11 MiB
itstool 1:2.0.7-1 -0,09 MiB
kjs 5.109.0-1 -1,53 MiB
lua52 5.2.4-5 -0,92 MiB
meson 1.2.1-1 -13,09 MiB
python-docutils 1:0.20.1-1 -5,72 MiB
vala 0.56.13-1 -14,39 MiB
Gesamtgröße der entfernten Pakete: 703,77 MiB
:: Möchten Sie diese Pakete entfernen? [J/n]
A sudo pacman -R $(pacman -Qdtq) only removes exactly the 15 orphaned packages found.
However, a sudo pacman -Rs $(pacman -Qdtq) and also a sudo pacman -Rsn $(pacman -Qdtq) both suddenly remove 36 packages!
In contrast, Pamac also finds exactly the same 15 orphaned packages (I saved myself a duplicate listing).
If I select all packages to remove and confirm, I get an intermediate query that suddenly says 27 packages to remove. I wrote these out here (Orphan is German and my orphan):
itstool
cmake
cppdap (Waise von: cmake)
rhash (Waise von: cmake)
jsoncpp (Waise von: cmake)
go
meson
python-tqdm (Waise von: meson)
python-typing_extensions (Waise von: meson)
ninja (Waise von: meson
appstream-glib
boost
gobject-introspection
python-mako (Waise von: gobject-introspection)
python-markupsafe (Waise von: gobject-introspection)
gtest
gendesk
asciidoc
go-tools
kjs
python-docutils
vala
gtk-doc (Waise von: vala)
glib2-docs (Waise von: vala)
docbook-xsl (Waise von:asciidoc)
docbook-xml (Waise von: asciidoc)
lua52
So apparently Pamac also removes dependencies that are no longer needed, but why does Pamac end up with 27 packages and Pacman with 36?
Or to put it another way, does anyone know what exactly Pamac is doing in the background, what command is being executed there?
PS: Sorry, my english is not the best!