Page 1 of 1

[SOLVED] - urpme --auto-orphans

PostPosted: May 2nd, '13, 03:50
by gohlip
Being new to urpmi cli - and Mageia too actually :oops: - googling gives me the impression that "urpme --auto-orphans" is not recommended. Is this still valid and if so, what are the recommended alternatives for it? Thanks.

Doing "urpme --auto-orphans" gives....
Code: Select all
writing /var/lib/rpm/installed-through-deps.list
To satisfy dependencies, the following xxx packages will be removed (xxMB):
(orphan packages)
.
.
.
Remove xx packages? (y/N) y
removing......
.
.

Removal failed:
        /usr/bin/wish is needed by (installed) xorriso-1.2.8-1.mga3.x86_64

I then
Code: Select all
urpme xorriso
urpme --auto-orphans
urpmi xorriso


There has to be a better way. Any ideas?

Cheers.

Re: urpme --auto-orphans

PostPosted: May 2nd, '13, 04:07
by Ken-Bergen
If you don't give us the full output of the "urpme --auto-orphans" command there's know way to tell what the problem is.

That said, unless you're running low on disc space removing orphan packages will not help your system run better/faster.

Re: urpme --auto-orphans

PostPosted: May 2nd, '13, 04:27
by daniewicz
I took this from a Mandriva forum some time ago.....


There is a good reason to be cautious with urpme --auto-orphans. It is VERY easy to unintentionally remove important packages with it.

urpme --auto-orphans works as designed, if you know how it really works,
as there's some mechanics that you need to know and need to pay attention to, so that it works exactly as you requested.

Small example:
You have a clean system as starting point, where urpme --auto-orphans gives no orphans, that is,
all packages currently installed were requested by you to be installed. Literally each one.
Then you install package foo, this pulls in packages bar and baz.

The orphans function marks bar and baz as not explicitely requested by putting them into /var/lib/rpm/installed-through-deps.list
Then, some time later you want to remove foo. But bar and baz stay, as they may still be of use, maybe they are some shared libraries.
Now, you could remove them via urpme --auto-orphans.

You can manually mark packages "un-orphaned" (i.e. remove them from /var/lib/rpm/installed-through-deps.list) by
telling urpmi to install that package, that will do nothing but remove it from the orphans list, as you told urpmi
directly to install it.

That is the ideal case. Just run urpme --auto-orphans (but DO NOT say yes to remove packages!!!)
to see how many "orphans" you currently have. If you want to keep them, just urpmi all of them ...
Then it works as you requested, and as i described.

Re: urpme --auto-orphans

PostPosted: May 2nd, '13, 07:25
by doktor5000

Re: urpme --auto-orphans

PostPosted: May 2nd, '13, 09:03
by gohlip
@ken, did not give full output because it is "after the fact". Naturally I could not recall the output. Sorry.
Thanks, ken, daniewicz and doktor5000 for your input. I have read these links and that's why I posted this topic and that's why I have the impression "urpme --auto-orphans" should not be performed. Yet other commands like "urpmi --clean" also seems 'suspect' after reading about it (does not clean but sweep it under the carpet, so to speak).

I generally like to keep the system free of junk (including keeping at most 3 kernels) and I am trying to find out what would be the most suitable/correct way to it.
It appears to me that "urpme --auto-orphans" seems to work well (except that failure to remove without removing xorriso first). I still hope to have some resolution to it and I will appreciate more input on this.

Thanks and cheers.

Re: urpme --auto-orphans

PostPosted: May 2nd, '13, 09:29
by gohlip
Hi, just did the following...
Code: Select all
[pop@localhost ~]$ sudo urpme --auto-orphans
[sudo] password for pop:
writing /var/lib/rpm/installed-through-deps.list
To satisfy dependencies, the following 2 packages will be removed (3.4MB):
 
(orphan packages)
  lib64tk8.5-8.5.13-2.mga3.x86_64
  tk-8.5.13-2.mga3.x86_64
Remove 2 packages? (y/N) y
removing lib64tk8.5-8.5.13-2.mga3.x86_64 tk-8.5.13-2.mga3.x86_64
Removal failed:
        /usr/bin/wish is needed by (installed) xorriso-1.2.8-1.mga3.x86_64

then
Code: Select all
[pop@localhost ~]$ kdesu kate /var/lib/rpm/installed-through-deps.list

and removed lib64tk8.5 and tk manually.

Code: Select all
[pop@localhost ~]$ sudo urpme --auto-orphans
[sudo] password for pop:
No orphans to remove

Done.

But still, I wonder if "urpme --auto-orphans" should be performed, though in my case, it seems to do no harm and cleaned up those unwanted thingies, (like er...dkms modules for removed kernels, lots other thingies which I cannot remember). But if I do encounter major issues, I'll let you know. And... I'll still appreciate some more input.

Cheers.

Re: urpme --auto-orphans

PostPosted: May 2nd, '13, 19:54
by doktor5000
gohlip wrote:I have read these links and that's why I posted this topic and that's why I have the impression "urpme --auto-orphans" should not be performed. Yet other commands like "urpmi --clean" also seems 'suspect' after reading about it (does not clean but sweep it under the carpet, so to speak).

What are you talking about? It does not sweep anything under the carpet, it does exactly what the manual says:

Code: Select all
       --clean
           Remove all packages from the cache in directory /var/cache/urpmi/rpms.

It's not needed for normal operation, only if you have used --noclean before on purpose and want to remove the downloaded packages.


gohlip wrote:then
Code: Select all
[pop@localhost ~]$ kdesu kate /var/lib/rpm/installed-through-deps.list

and removed lib64tk8.5 and tk manually.

Code: Select all
[pop@localhost ~]$ sudo urpme --auto-orphans
[sudo] password for pop:
No orphans to remove

Done.

Well, actually you should have done an
Code: Select all
urpmi lib64tk8.5 tk
to mark them as manually installed and wanted, and as a result removing them from the list ...

But still, I wonder if "urpme --auto-orphans" should be performed, though in my case, it seems to do no harm and cleaned up those unwanted thingies, (like er...dkms modules for removed kernels, lots other thingies which I cannot remember). But if I do encounter major issues, I'll let you know. And... I'll still appreciate some more input.

Cheers.

As a general rule, no it should not, as it does not "clean" anything, or removed unwanted things. It also doesn't removed compiled dkms modules, only the rpm packages out of which the modules where compiled, which are much smaller. Seems you're like one of those guys who would also blindly run CCleaner or similar tools like TuneUp on windows, without really knowing what they do, what harm they can do to a clean and proper installation, just to "... clean registry and optimize your computer and improve performance" balh blew bleh ...

Honestly, disabling services for bootup or on desktop start, minimizing memory footprint or buying an SSD would be much more effective and measurable than just removing some packages from your system, which don't do any harm. But so be it ...

Re: urpme --auto-orphans

PostPosted: May 3rd, '13, 01:11
by gohlip
Appreciate your further input but no, I don't install 'extraneous' untrusted 'utility packages' in any OS, but linux cli? I wouldn't think they are 'untrusted', but yes, I agree we should know what they do, hence my query. Still, I wonder if a linux cli is not recommended, why is it there.

thanks again.

Cheers.

oh......I did change my windows time to UTC through the registry. but that's the right thing to do, right? :lol:

Re: urpme --auto-orphans

PostPosted: May 3rd, '13, 09:21
by digigold
I use urpme --auto-orphans regularly. It will tell you what is orphaned and qued for removal. If you see something you don't want uninstalled simply remove it from /var/lib/rpm/installed-through-deps.list.
If you don't feel comfortable editing this file you can mark the package as manually installed.

So lets say kdelibs4-core shows up in the uninstall list. You can remove its orphan status by either:
#1
Code: Select all
# cd /var/lib/rpm && cp -afv installed-through-deps.list installed-through-deps.bak && sed '/kdelibs4-core/d' installed-through-deps.bak > installed-through-deps.list

or

#2
Code: Select all
# urpmi kdelibs4-core

This will output: Package kdelibs4-core is already installed
Marking kdelibs4-core as manually installed, it won't be auto-orphaned
writing /var/lib/rpm/installed-through-deps.list

Re: urpme --auto-orphans

PostPosted: May 3rd, '13, 11:50
by gohlip
Alright! Good to know and thanks for sharing.
I'll mark this solved, digigold.
Cheers!

ps: to paraphrase...
"Seems you're like one of those guys who would also....." keep your office table neat and uncluttered. As they say, a cluttered table is a sign of a cluttered mind.
A cluttered OS? That's worse! :lol:

Re: urpme --auto-orphans

PostPosted: May 3rd, '13, 13:41
by digigold
gohlip wrote:[...]"Seems you're like one of those guys who would also....." keep your office table neat and uncluttered. As they say, a cluttered table is a sign of a cluttered mind.
A cluttered OS? That's worse! :lol:

Actually I'm a bit of a slob when it comes to physical clutter; however, I am almost OCD like when it comes to my data...go figure. :roll:

Re: [SOLVED] - urpme --auto-orphans

PostPosted: May 3rd, '13, 13:45
by gohlip
:lol:

Re: urpme --auto-orphans

PostPosted: May 3rd, '13, 19:39
by doktor5000
gohlip wrote:Appreciate your further input but no, I don't install 'extraneous' untrusted 'utility packages' in any OS, but linux cli? I wouldn't think they are 'untrusted', but yes, I agree we should know what they do, hence my query. Still, I wonder if a linux cli is not recommended, why is it there.

What are you talking about?

Re: [SOLVED] - urpme --auto-orphans

PostPosted: May 3rd, '13, 20:53
by gohlip
Seems you're like one of those guys who would also blindly run CCleaner or similar tools like TuneUp on windows, without really knowing what they do, what harm they can do to a clean and proper installation, just to "... clean registry and optimize your computer and improve performance" balh


What are you talking about??
I was talking about whatever you are talking about.