Removing orphans

Ask questions about Arch Linux ARM. Please search before making a new topic.

Removing orphans

Postby unformatted » Wed Aug 25, 2021 9:08 am

I have a RPi4 with armv7 and kodi-rpi 19.1-11 installed. I'm following the arch wiki on system maintenance and am now checking for orpans:
$this->bbcode_second_pass_code('', '
[user@PC19 ~]$ pacman -Qdt
cmake 3.21.1-1
cracklib 2.9.7-2
kodi-platform 20190726.809c5e9-28
kodi-rpi-dev 19.1-11
libva 2.12.0-1
')

I have the following AUR packages installed:
$this->bbcode_second_pass_code('', '
[user@PC19 ~]$ pacman -Qm
hyperion.ng-git r2292.5ef8c23b-1
kodi-addon-pvr-hts 8.3.4-1
package-query 1.12-1
')

I see kodi-addon-pvr-hts and hyperion.ng-git use cmake as a dependency and is marked "(make)". Does that mean it is only used during package building and can it be safely removed now? Then I could also remove kodi-platform and kodi-rpi-dev.

I cannot find anything on cracklib and libva however. Can they be safely removed and how would you know for sure?
unformatted
 
Posts: 119
Joined: Tue Mar 09, 2021 5:23 pm

Re: Removing orphans

Postby robg » Thu Aug 26, 2021 3:56 pm

You can safely remove these.

In such a situation, it is always advisable to consult the (fresh and awesome) Arch manual pages. Under pacman(8), it states that the -Qdt switch will only list local packages (Q) that have been installed as dependency a of another package (d), but that are no longer required by any package (t).

Note that you can prevent accumulation of build dependencies when dealing with AUR packages by using `makepkg -src`: "s" will download any required (build and run) dependencies from the sync repositories; "r" removes dependencies pulled in by the "s" switch; and "c" removes leftover build files.
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: Removing orphans

Postby unformatted » Thu Aug 26, 2021 4:49 pm

Well, impatient as I am, I already decided to remove those files but not after making a backup first ;-) and it turned out ok. On another Pi I had a larger list of orphans. After deleting the orphans it didn't boot anymore, turned out one of the orphans was raspberry-bootloader-x which was installed as a dependency of another pacakge (pacman -Qi). After changing the installation reason to asexplicit, it didn't show up on the orphans list anymore and after removing and reboot all worked well.

I must confess that all these years I actually never took care of orphans, shame on me. I always upgraded using pacman -Syu, no partial updates, so the damage was limited. Of course all is on the wiki under system maintenance.

I didn't know about the "makepkg -src" option for the AUR packages, I always use "makepkg -si". So I gues I have to use "makepkg -srci" to clean up before installing.

The arch man pages and the wiki are indeed a great place to start. Actually the wiki has been the reason for me to choose arch arm on all of my Pi's many years ago. Being new to Linux at that time I learned an awful lot from the wiki and I'm still learning. Thanks.
unformatted
 
Posts: 119
Joined: Tue Mar 09, 2021 5:23 pm

Re: Removing orphans

Postby graysky » Thu Aug 26, 2021 5:59 pm

Alternatively you can build in a clean build root but that is a bit more complex.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to User Questions

Who is online

Users browsing this forum: No registered users and 29 guests