[MAQeia] Orphan packages explanation

Here you'll find the "Mostly Asked Questions" about Mageia.

Before getting to support forum, have a look here... there are great chances that MAQeia can help...

[MAQeia] Orphan packages explanation

Postby saptech » Nov 13th, '12, 01:33

If I install a package using "urpmi alien" and let's say it will install 10 files total, then if I remove the package using the "urpme" command, does it remove all 10 files total?

If not, what is the best command to use to remove all 10 files?

Thnx.
Last edited by doktor5000 on Nov 18th, '14, 21:26, edited 2 times in total.
Reason: adjusted thread title
Each One Teach One
--------------------------------
Mageia 7 & Debian 10
HP Compaq Elite 8300 | Intel Core i5 | 8gb | 120gb SSD
--------------------------
Mageia 7 & Debian 10
Dell Optiplex 760 | Quad Core | 4gb | 250gb HDD
User avatar
saptech
 
Posts: 234
Joined: Apr 5th, '11, 08:36
Location: STL

Re: Removing Packages

Postby doktor5000 » Nov 13th, '12, 19:35

No, it will only remove the package that you requested to install, not the dependencies.
This is what the urpme --auto-orphans options was intended to do, and basically it 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.

Only other way would be to
Code: Select all
grep -F [RPM] /var/log/syslog
and look for packages that were installed
together with the one you want to remove to manually remove them also, but that's more fiddling ...
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: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Removing Packages

Postby djennings » Nov 14th, '12, 18:26

There is a good reason to be cautious with urpme --auto-orphans.

It is VERY easy to unintentionally remove important packages with it.


Consider this example.
You have the meta-package task-kde installed. A meta package is an empty package which does not contain any files, but has many other packages as dependencies. task-kde has 100's of packages as dependencies.

Now you remove just one of those packages because you do not want it. Say for example it is the document reader okular. Removing okular means that one of the dependencies of task-kde is missing and so the meta package task-kde is removed as well. That is fine, all the other packages which were installed as part of task-kde are still in place, only now they are marked as orphans. Now if you were to run urpme --auto-orphans you would see there were 100's of orphaned packages, and one press of your keyboard would erase your entire KDE installation.

Lots of newbies have caused serious damage to their installation because they paid attention to the pop up window rpmdrake shows after deleting a package about removing orphans. I for one wish that rpmdrake hid the existence of the --auto-orphan option.
Last edited by doktor5000 on Nov 14th, '12, 20:49, edited 1 time in total.
Reason: added some colour
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Removing Packages

Postby saptech » Nov 15th, '12, 21:48

I understand somewhat about the --auto-orphan issue. If I'm not mistaken, it was an issue with Mandriva also. I hardly run it myself. I was just wondering about removing small files with few dependencies as the example I gave. But since most of the smaller programs use few dependencies, I guess it's okay to leave them installed if I remove the main program. The size shouldn't matter now days with huge hard drive space.

Thanks for the replies.
Each One Teach One
--------------------------------
Mageia 7 & Debian 10
HP Compaq Elite 8300 | Intel Core i5 | 8gb | 120gb SSD
--------------------------
Mageia 7 & Debian 10
Dell Optiplex 760 | Quad Core | 4gb | 250gb HDD
User avatar
saptech
 
Posts: 234
Joined: Apr 5th, '11, 08:36
Location: STL

Re: Removing Packages

Postby doktor5000 » Nov 15th, '12, 22:22

Can you please mark the thread as [SOLVED] or [DONE]? BTW, i've forwarded this to the doc team, resulting in https://wiki.mageia.org/en/Removing_packages
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: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Removing Packages

Postby saptech » Nov 16th, '12, 09:35

Thanks for fowarding it to the Doc team...
Each One Teach One
--------------------------------
Mageia 7 & Debian 10
HP Compaq Elite 8300 | Intel Core i5 | 8gb | 120gb SSD
--------------------------
Mageia 7 & Debian 10
Dell Optiplex 760 | Quad Core | 4gb | 250gb HDD
User avatar
saptech
 
Posts: 234
Joined: Apr 5th, '11, 08:36
Location: STL

Re: Removing Packages

Postby filip » Jan 17th, '13, 12:03

doktor5000 wrote:... i've forwarded this to the doc team, resulting in https://wiki.mageia.org/en/Removing_packages

Thanks doktor5000, I think it also deserve a place in MAQeia somewhere as it's very clear, informative and important.

What about reporting a bug as mentioned in the last sentence there:
I for one wish that rpmdrake hid the existence of the urpme --auto-orphans option.
I think that many of us agree with that :D.
filip
 
Posts: 431
Joined: May 4th, '11, 22:10
Location: Kranj, Slovenia

Re: (DONE) Removing Packages

Postby doktor5000 » Jan 17th, '13, 23:25

Well, making a MAQeia out of it only duplicates the information. Maybe we should first discuss what should be put where, forum or wiki ...

For the bug, there's https://bugs.mageia.org/show_bug.cgi?id=8123 now which is partly about this topic.
But i agree too with that behaviour, the message should be made opt-in, and not like it is currently, not even opt-out.
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: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: (DONE) Removing Packages

Postby filip » Jan 17th, '13, 23:48

doktor5000 wrote:Well, making a MAQeia out of it only duplicates the information. Maybe we should first discuss what should be put where, forum or wiki ...
I had link in my mind. So no duplication. I think that wiki has priority over forum for documentation and forum is one of our communication tools and as such could be also a good pointer to wiki. Especially for newcomers. At least that is the way I see them.
filip
 
Posts: 431
Joined: May 4th, '11, 22:10
Location: Kranj, Slovenia

Re: (DONE) Removing Packages

Postby doktor5000 » Jan 17th, '13, 23:59

I've added viewtopic.php?f=36&t=4231 and will continue when i've got more time *zzzzzzzzzzzzz*
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: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: (DONE) Removing Packages

Postby filip » Jan 18th, '13, 09:07

Thanks for your contributions doktor5000.

Visits will tell us some hints about its usefulness.
filip
 
Posts: 431
Joined: May 4th, '11, 22:10
Location: Kranj, Slovenia

Re: [MAQeia] Orphan packages explanation

Postby doktor5000 » Nov 18th, '14, 21:27

FWIW, simply converted this to a MAQeia as it was lurking and hidden in the abyss of old zombie forum threads.
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: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MAQeia] Orphan packages explanation

Postby doktor5000 » Nov 19th, '14, 14:18

filip wrote:What about reporting a bug as mentioned in the last sentence there:
I for one wish that rpmdrake hid the existence of the urpme --auto-orphans option.
I think that many of us agree with that :D.

That has long ago been reported and "resolved": https://bugs.mageia.org/show_bug.cgi?id=920
As the issue still persists and was not really fixed, I've cloned it into a new bug: https://bugs.mageia.org/show_bug.cgi?id=14594

For further bugs related to orphans, see https://wiki.mageia.org/en/Removing_pac ... ug_reports
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: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to MAQeia

Who is online

Users browsing this forum: No registered users and 1 guest