[SOLVED] - urpme --auto-orphans

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] - urpme --auto-orphans

Postby gohlip » May 2nd, '13, 03:50

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.
Last edited by gohlip on May 3rd, '13, 11:52, edited 1 time in total.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: urpme --auto-orphans

Postby Ken-Bergen » May 2nd, '13, 04:07

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.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: urpme --auto-orphans

Postby daniewicz » May 2nd, '13, 04:27

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.
The dude abides.
User avatar
daniewicz
 
Posts: 224
Joined: Feb 10th, '13, 03:37

Re: urpme --auto-orphans

Postby doktor5000 » May 2nd, '13, 07:25

Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: urpme --auto-orphans

Postby gohlip » May 2nd, '13, 09:03

@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.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: urpme --auto-orphans

Postby gohlip » May 2nd, '13, 09:29

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.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: urpme --auto-orphans

Postby doktor5000 » May 2nd, '13, 19:54

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 ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: urpme --auto-orphans

Postby gohlip » May 3rd, '13, 01:11

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:
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: urpme --auto-orphans

Postby digigold » May 3rd, '13, 09:21

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
"A mind that is stretched by a new experience can never go back to its old dimensions."
~Oliver Wendell Holmes, Jr.
User avatar
digigold
 
Posts: 150
Joined: May 9th, '12, 14:50
Location: Northern U.S.

Re: urpme --auto-orphans

Postby gohlip » May 3rd, '13, 11:50

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:
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: urpme --auto-orphans

Postby digigold » May 3rd, '13, 13:41

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:
"A mind that is stretched by a new experience can never go back to its old dimensions."
~Oliver Wendell Holmes, Jr.
User avatar
digigold
 
Posts: 150
Joined: May 9th, '12, 14:50
Location: Northern U.S.

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

Postby gohlip » May 3rd, '13, 13:45

:lol:
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: urpme --auto-orphans

Postby doktor5000 » May 3rd, '13, 19:39

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?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

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

Postby gohlip » May 3rd, '13, 20:53

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.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest