Page 1 of 1

[DONE] remove orphans

PostPosted: Mar 29th, '14, 03:05
by joebuk
29/3/14 - I used the code below to remove orphan files from Mageia 4
which was an upgrade of Mag 3 which was an upgrade of Mag2:
Code: Select all
#!/bin/sh           
filename="orphans.txt"
while read line           
do           
    yum remove -y $line   # y is pre-emptive yes       
done <$filename
rpmorphan

# run rpmorphan > /home/tomato/Desktop/orphans.txt
# then this file as su - this file is in bin folder
# 29/3/14 had to run it 6 times to remove all orphans


Above constitutes the file, including the comments which were for reminding myself in future.
There might be some recursive way to avoid the 6 time repeat, but it was good enough for me on this occasion.

Re: remove orphans

PostPosted: Mar 29th, '14, 04:16
by jkerr82508
Why use yum? Mageia package manager is urpm.
https://wiki.mageia.org/en/URPMI

IMHO the best way to manage orphans is to use qt4urpm:
https://wiki.mageia.org/en/Removing_packages

Jim

Re: remove orphans

PostPosted: Mar 30th, '14, 04:44
by joebuk
30/3/14 - the script I included in my post of yesterday, where I said I had to run it 6 times, wiped out the Mageia Control Centre.
So after a lot of all-over-the-place searching I came accross:
http://www.rpmfind.net/linux/rpm2html/s ... y=drakconf
from where I downloaded:
drakconf-12.51-1.mga4.noarch.rpm
which run by: urpmi drakconf-12.51-1.mga4.noarch.rpm
restore the MCC, and my OS is still clear of orphans.

Re: remove orphans

PostPosted: Mar 30th, '14, 10:54
by doktor5000
What's actually the point of this thread, if you don't even respond to suggestions and don't reply to questions?

Re: remove orphans

PostPosted: Mar 30th, '14, 11:48
by jkerr82508
FWIW, on my mga4 system, rpmorphan reports a list of "orphans". These are all packages that I want to keep and so have previously used urpmi to mark them as not orphans. As a result, urpmi does not report them as orphans. As the OP has discovered, removing all packages that rpmorphan reports as orphans has the same risks as using "urpme --auto-orphans" and so is not recommended.

Jim

Re: remove orphans

PostPosted: Mar 31st, '14, 03:08
by toomuchcoffee
Quick question, if I may jump in here...

I've noticed too that the package manager brings up a list of orphaned packages whenever I update the system or install a new package. Why are orphaned packages such a big deal that users have to be reminded about them so often? Other than taking up a bit of hard disk space, which is fairly insignificant on modern systems, I don't see any problems orphans might cause. On the other hand, as is pointed out in various threads around this forum, removing orphans willy-nilly isn't without risks.

So, wouldn't it be better for the package manager to just keep quiet about the orphans? Or am I missing something? Why is Mageia's package manager doing this? I don't remember seeing this in other distros.

Re: remove orphans

PostPosted: Mar 31st, '14, 07:13
by doktor5000
Please see https://wiki.mageia.org/en/Removing_packages and the previous threads about orphans for more information on your questions.
Also have a look at e.g. https://bugs.mageia.org/show_bug.cgi?id=920

Re: remove orphans

PostPosted: Mar 31st, '14, 08:57
by toomuchcoffee
Thanks, doktor5000, interesting reading, particularly the bug report.