Today if I do $ yum remove packageA I am greeted with:

packageA                        noarch                 3.5.1.b37-15                                 @yumFS                 293 k
Removing for dependencies:
 packageB                      noarch                 3.5.1.b125-7                                 @yumFS                  87 M
Is this ok?

I would like to remove packageA without removing packageB (etc) is this possible?

  • 1
    Possible? Yes. But the entire purpose of package managers is to prevent exactly this. Google around for "RPM Hell" for a good idea of what you're setting yourself up for by doing such a thing. – DopeGhoti Jun 21 '17 at 23:02

Appears possible, by using rpm:

$ rpm -e --nodeps packageA

though obviously be very careful, since if you remove a dependency package and don't put it back that could lead to unexpected results for the packages that still depend on it...

  • Question about this. I was having a dependency version issue, the warning was Application built with libpng-1.6.16 but running with 1.5.13. I thought I'd just swap it, but yum wanted to remove a ton of stuff if I first removed libpng. So I used the approach you show here to remove both libpng and libpng-devel, then built and installed libpng-1.6.1 from source, and my problem went away. While it worked for software I immediately needed (Mapnik), can I trust that I didn't break something else back upstream, for example something yum initially wanted to remove along with libpng? – elrobis Jun 18 at 20:36
  • So there was no package option to install 1.6? Hmm my hunch is they use shared libraries and you're good, but they weren't tested by the package managers either so...I dunno how the package management system works. – rogerdpack Jun 18 at 21:20

I found it was possible to do this with yum like so:

sudo yum remove --noautoremove <package name>
  • 1
    Hmm...I tried it out on CentOS 6 and 7 and got "no such option: --noautoremove" any ideas? – rogerdpack Jun 6 at 16:05
  • 2
    I was on fedora 29 when I did this testing a new package I just created. Hmm.. wonder if its a fedora only thing. – Jaime Jun 6 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.