Removing orphans on my system

Phew, I wanted to clean my system. That’s no small amount of orphans. Can I safely delete it?
What would be the safest way to do the least damage with this amount of packages?

✗  LANG=C yay -Yc
checking dependencies...

Package (53)                 Old Version                     Net Change 

bluez-qt5                    5.115.0-1                         -2,18 MiB
botan2                       2.19.3-1                          -7,40 MiB
bruteforce-luks-debug        1.4.0-1                           -0,06 MiB
clang15                      15.0.7-2                        -130,93 MiB
compiler-rt15                15.0.7-1                         -39,95 MiB
db                           6.2.32-1                          -7,16 MiB
futuresql-qt5                0.1.1-2                           -0,07 MiB
go                           2:1.22.1-1                      -209,54 MiB
grantlee                     5.3.1-1                           -4,80 MiB
imagewriter-debug            1.10.1432200249.1d253d9.2.19-1    -4,96 MiB
kactivities-stats5           5.115.0-1                         -0,56 MiB
kactivities5                 5.115.0-1                         -0,75 MiB
kcalendarcore5               5.115.0-1                         -3,79 MiB
kcolorpicker-qt5             0.3.1-4                           -0,08 MiB
kcontacts5                   5.115.0-1                         -2,10 MiB
kdav5                        1:5.115.0-1                       -1,03 MiB
kdeclarative5                5.115.0-1                         -1,62 MiB
kdelibs4support              5.115.0-1                        -18,10 MiB
kdesu5                       5.115.0-1                         -0,53 MiB
kdiagram5                    2.8.0-1                           -2,27 MiB
kdnssd5                      5.115.0-1                         -0,60 MiB
kdsoap-qt5                   2.2.0-1                           -1,21 MiB
kemoticons                   5.115.0-1                         -2,50 MiB
kfilemetadata5               5.115.0-1                         -1,51 MiB
kholidays5                   1:5.115.0-1                       -1,16 MiB
kidletime5                   5.115.0-1                         -0,35 MiB
kimageannotator-qt5          0.7.1-2                           -1,54 MiB
kirigami-addons5             0.11.0-7                          -0,82 MiB
kitemmodels5                 5.115.0-1                         -1,03 MiB
klassy-debug                 6.0.breeze6.0.2-2                -79,26 MiB
kpeople5                     5.115.0-1                         -0,85 MiB
kpty5                        5.115.0-1                         -0,40 MiB
kquickimageeditor5           0.3.0-2                           -0,10 MiB
kross                        5.115.0-1                         -1,73 MiB
krunner5                     5.115.0-1                         -0,83 MiB
ldns                         1.8.3-2                           -1,88 MiB
libkcddb5                    24.02.0-1                         -0,29 MiB
libqaccessibilityclient-qt5  0.6.0-1                           -0,24 MiB
librewolf-bin-debug          123.0-1                           -0,06 MiB
llvm15-libs                  15.0.7-1                        -121,14 MiB
modemmanager-qt5             5.115.0-1                         -1,28 MiB
networkmanager-qt5           5.115.0-1                         -3,64 MiB
pacseek-debug                1.8.2-3                           -4,33 MiB
plasma-framework5            5.115.0-3                         -5,12 MiB
prison5                      5.115.0-1                         -0,63 MiB
purpose5                     5.115.0-3                         -1,47 MiB
python-distro                1.9.0-1                           -0,20 MiB
qgpgme-qt5                   1.23.2-1                          -1,05 MiB
qqc2-desktop-style5          5.115.0-1                         -0,32 MiB
qt5-networkauth              5.15.13-1                         -0,23 MiB
qt5-webview                  5.15.13-1                         -0,21 MiB
threadweaver5                5.115.0-1                         -0,88 MiB
webrtc-audio-processing      0.3.1-4                           -0,80 MiB

Total Removed Size:  675,54 MiB

:: Do you want to remove these packages? [Y/n] 

2 Likes

Nobody can answer that question except for you. :slight_smile:

Orphans aren’t packages you don’t need anymore.

That being said, most of those are old plasma 5 dependencies that you probably don’t need anymore.

Other things like go and clang15 are probably build dependencies and should consider if you want to keep reinstalling them every time you build those packages.

4 Likes

go is a dependency of pacseek. clang15 i dont know.

It looks like the packages ending with *5 are remnants of Plasma 5. I will probably remove all of this piece by piece.

1 Like

I guess I’ve been lucky because i always remove orphans. Usually i use pamac to look at them and then let it remove them. I’ve not used yay -Yc often. :man_shrugging:

1 Like

It looks similar with pacman -Qqtd

➜  LANG=C pacman -Qqtd
bluez-qt5
botan2
bruteforce-luks-debug
clang15
db
futuresql-qt5
go
grantlee
imagewriter-debug
kactivities-stats5
kcalendarcore5
kcontacts5
kdav5
kdelibs4support
kdesu5
kdiagram5
kdnssd5
kdsoap-qt5
kfilemetadata5
kholidays5
kidletime5
kimageannotator-qt5
kirigami-addons5
klassy-debug
kpeople5
kquickimageeditor5
kross
krunner5
ldns
libkcddb5
libqaccessibilityclient-qt5
librewolf-bin-debug
modemmanager-qt5
networkmanager-qt5
openssl-1.1
pacseek-debug
purpose5
python-distro
qgpgme-qt5
qqc2-desktop-style5
qt5-networkauth
qt5-webview
webrtc-audio-processing

You can create a list of the orphans by sending pacman’s output to a text file:

pacman -Qdtq > orphans.txt

Then, after cleaning them, you have a reference of what was removed, just in case you might need it :wink:.

8 Likes

That’s a really good idea :wink:

5 Likes

Only make dependency not a “hard dependency”.
It is needed only when you build pacseek (in this case). That is why it is showing up in the orphan output.

4 Likes

If you use yay or paru, you can recursively remove all unneeded dependencies (“orphans”) with:

yay -Yc

or

paru -c

You can safely remove those unneeded dependencies. The worst that can happen is that they are automatically reinstalled when something from the AUR is updated.

7 Likes

The -dt flags in combination with -Q produces a list of “real orphans” (wording is not mine but man pacman’s).

These are packages that are neither required as direct dependency of any other packages on your system nor are they optionally required by any other packages in your system.

Unless you want to keep one (or some) as in the case of go for example, they can be removed.

3 Likes

Yes I use yay.

Done!

Restarted , Plasma 6 has started. Everything went well so far.

Thank you all!

3 Likes

AFAIK, some QT5 apps need some dependencies *5, if they respect your custom theme.

If you notice a problem later, you will install some dependencies back. That’s up to you

1 Like

I decided on klassy as the theme and window decoration. This fits perfectly with Plasma6. I’m very happy at the moment and don’t think I’ll make any major changes at some point.

Thanks to @Stagger_Lee i have the output to a .txt :wink:

pacman -Qdtq > orphans.txt

4 Likes

You can also look at your /var/log/pacman.log to find out what got removed… :wink:

Your entire history of package management is stored there, so you know exactly when and what you’ve installed, removed, or upgraded.

Keep in mind that this list is probably shorter than the list of packages that got removed with yay -Yc. This is because pacman -Qdtq lists only the currently unneeded dependencies. But these packages may also depend on other packages, so when they are removed, other packages become new unneeded dependencies. And when those are removed, there may be even more packages that become unneeded. And so on and so on… yay -Yc removes all of them recursively, so that no unneeded dependencies remain on your system.

5 Likes

With my question in the opening post about whether it is safe to remove all this, I have once again learned a lot thanks to you. Soon I won’t need you anymore :sweat_smile:

2 Likes

He’ll be an orphan! :rofl:

10 Likes

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