Ask Your Question
2

Attempting to uninstall a package. How to I get around "The operation would result in removing the following protected packages: dnf"?

asked 2018-06-23 13:57:36 -0500

I have been playing around with Python in the last few days on Fedora 28. I installed python3-pip as follows:

sudo dnf install python3-pip

I now want to uninstall it. When I execute:

sudo dnf remove python3-pip

I get the following message:

Error:
Problem: The operation would result in removing the following protected packages: dnf

This does not happen with other packages, so I assume the problem is with the python3-pip package. How do I delete it?

edit retag flag offensive close merge delete

Comments

1

Please report this in the Fedora bug tracker.

Aeyoun gravatar imageAeyoun ( 2018-06-24 09:18:25 -0500 )edit
1

There is a related bug report (1516427) which I just found.

Jim O gravatar imageJim O ( 2018-06-24 10:06:22 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2018-06-23 15:55:55 -0500

villykruse gravatar image

updated 2018-06-24 09:02:10 -0500

You cannot remove python3-pip as it is required by the python3 package, and python3 is required by rpm.

edit flag offensive delete link more

Comments

I tried that, but got the same error.

Jim O gravatar imageJim O ( 2018-06-24 06:48:55 -0500 )edit

I will modify my answer.

villykruse gravatar imagevillykruse ( 2018-06-24 08:59:10 -0500 )edit

I am not convinced that python3 requires python3-pip. On a new install of Fedora 28, python3 is installed, but python3-pip is not. It has to be installed manually.

Jim O gravatar imageJim O ( 2018-06-24 09:12:09 -0500 )edit
1

rpm says it does: Maybe that is a bug.

# rpm -qR python3
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libdl.so.2()(64bit)
libm.so.6()(64bit)
libpthread.so.0()(64bit)
libpython3.6m.so.1.0()(64bit)
libutil.so.1()(64bit)
python3-libs(x86-64) = 3.6.5-1.fc28
python3-pip                                     <<<<<<<<<<<<<<<<<<<<<
python3-setuptools
villykruse gravatar imagevillykruse ( 2018-06-24 09:21:41 -0500 )edit

I found a bug report (1516427) requesting that python3-pip and python3-setuptools be changed from required to recommended. There has been some discussion and the resolution so far is wait to see what comments are provided. One of the comments states that even if they go ahead with this change, the change will be low priority, which of course means it will probably never be done.

At least I now know why I can't remove python3-pip and that it will likely remain that way.

Jim O gravatar imageJim O ( 2018-06-24 10:04:46 -0500 )edit
2

answered 2018-06-24 18:17:03 -0500

gitman gravatar image

rpm -e --nodeps python3-pip

but only if you're 100% sure it wasn't there before...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-06-23 13:57:36 -0500

Seen: 120 times

Last updated: Jun 24