Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unmerge package and all of its reverse dependencies?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
JacksonAndNoBank
n00b
n00b


Joined: 10 Feb 2025
Posts: 3

PostPosted: Mon Feb 10, 2025 11:54 pm    Post subject: Unmerge package and all of its reverse dependencies? Reply with quote

How would one unmerge a package along with all of its reverse dependencies? Forgive me if this is a stupid question - I've just started using Gentoo. Things are working okay otherwise and portage seems very well-engineered on the whole.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23100

PostPosted: Tue Feb 11, 2025 1:32 am    Post subject: Reply with quote

Welcome to the forums.

Caution: first, read man emerge about --depclean and its limitations. After that, run emerge --ask --verbose --depclean unwanted-package-atom to remove the specific package. This step will gracefully refuse to proceed if the unwanted package is itself required by something else on the system. If the first command succeeds, follow up with a general emerge --ask --depclean to then remove everything which is now orphaned.

Changed the lightblue color of your highlited text to orange. It was not readable on the post background color. -- Banana
Back to top
View user's profile Send private message
JacksonAndNoBank
n00b
n00b


Joined: 10 Feb 2025
Posts: 3

PostPosted: Tue Feb 11, 2025 6:45 am    Post subject: Reply with quote

Hu wrote:
Welcome to the forums.

Caution: first, read man emerge about --depclean and its limitations. After that, run emerge --ask --verbose --depclean unwanted-package-atom to remove the specific package. This step will gracefully refuse to proceed if the unwanted package is itself required by something else on the system. If the first command succeeds, follow up with a general emerge --ask --depclean to then remove everything which is now orphaned.

Changed the lightblue color of your highlited text to orange. It was not readable on the post background color. -- Banana


That's not quite what I mean. Suppose two instances X and Y of some package are causing a slot conflict. If you were to remove everything that's pulling in X then you're free to install Y and the slot conflict is resolved. I'm sure that's not always how one should resolve a slot conflict, but it may help if you're making large changes. Please let me know if I've got any of this wrong.
Back to top
View user's profile Send private message
ian.au
l33t
l33t


Joined: 07 Apr 2011
Posts: 612
Location: Australia

PostPosted: Tue Feb 11, 2025 8:39 am    Post subject: Reply with quote

JacksonAndNoBank wrote:
Hu wrote:
Welcome to the forums.

Caution: first, read man emerge about --depclean and its limitations. After that, run emerge --ask --verbose --depclean unwanted-package-atom to remove the specific package. This step will gracefully refuse to proceed if the unwanted package is itself required by something else on the system. If the first command succeeds, follow up with a general emerge --ask --depclean to then remove everything which is now orphaned.

Changed the lightblue color of your highlited text to orange. It was not readable on the post background color. -- Banana


That's not quite what I mean. Suppose two instances X and Y of some package are causing a slot conflict. If you were to remove everything that's pulling in X then you're free to install Y and the slot conflict is resolved. I'm sure that's not always how one should resolve a slot conflict, but it may help if you're making large changes. Please let me know if I've got any of this wrong.


Welcome JacksonAndNoBank,

Portage can usually resolve slot conflicts on its own, when it needs you to intervene it always tells you what the problem is, and what it needs you to do to help resolve it. It isn't always that easy to interpret that advice.

If you have an issue like that, and can't work out how to proceed, the best course of action always is to post the portage message here, along with your emerge --info. Someone will interpret it for you, usually pretty quickly.

I'm not sure if you removed all the dependencies with portage from your post - which you would do with emerge --depclean as Hu said.

If that doesn't work, more digging and investigation is required. Manually ripping things out or pushing things into your system won't ever be the optimal solution.
Back to top
View user's profile Send private message
JacksonAndNoBank
n00b
n00b


Joined: 10 Feb 2025
Posts: 3

PostPosted: Tue Feb 11, 2025 10:36 am    Post subject: Reply with quote

ian.au wrote:
JacksonAndNoBank wrote:
Hu wrote:
Welcome to the forums.

Caution: first, read man emerge about --depclean and its limitations. After that, run emerge --ask --verbose --depclean unwanted-package-atom to remove the specific package. This step will gracefully refuse to proceed if the unwanted package is itself required by something else on the system. If the first command succeeds, follow up with a general emerge --ask --depclean to then remove everything which is now orphaned.

Changed the lightblue color of your highlited text to orange. It was not readable on the post background color. -- Banana


That's not quite what I mean. Suppose two instances X and Y of some package are causing a slot conflict. If you were to remove everything that's pulling in X then you're free to install Y and the slot conflict is resolved. I'm sure that's not always how one should resolve a slot conflict, but it may help if you're making large changes. Please let me know if I've got any of this wrong.


Welcome JacksonAndNoBank,

Portage can usually resolve slot conflicts on its own, when it needs you to intervene it always tells you what the problem is, and what it needs you to do to help resolve it. It isn't always that easy to interpret that advice.

If you have an issue like that, and can't work out how to proceed, the best course of action always is to post the portage message here, along with your emerge --info. Someone will interpret it for you, usually pretty quickly.

I'm not sure if you removed all the dependencies with portage from your post - which you would do with emerge --depclean as Hu said.

If that doesn't work, more digging and investigation is required. Manually ripping things out or pushing things into your system won't ever be the optimal solution.


I'm all set for now, thanks. You're right, it's certainly not something one would do very often, but it's the default behavior for synaptic package manager (though not for apt-get remove), for instance. The reverse dependencies would break anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum