1

I heard that I should never use --nodeps option when I do a rpm -e command.

Why does this option exist then?

  • 1
    Simple answer: When you really, really, really know what you're doing. – Shadur Feb 10 '16 at 12:35
  • I love simple answers ! – Pozinux Feb 10 '16 at 14:07
2

It exists for broadly the same reasons rm will allow you to delete the filesystem root, or dd will allow you to overwrite the physical hard drive:

Linux and unix have a long history of giving you all the ammo you need when you really insist on shooting yourself in the foot.

Less flippantly, when something has gone badly wrong during a package install, whether due to a badly built package or an outage at the worst possible moment, it's possible to wind up with your package manager's dependency database in gridlock -- IE, it can't resolve the problem because attempting any of the solutions would violate the dependencies of the other packages involved. In that case, you can use --nodeps, or for dpkg, the --force-* options to manually and forcibly remove the offending package, and then immediately issue what commands are necessary to fix the now broken dependencies.

That's something you should only do if you're really sure of what you're doing, however; as a rule of thumb, if you aren't sure what use --nodep is, don't use it. You're essentially taking all the safeties off, and gods help you if you screw something up while doing it.

  • Exactly what I wanted to know and thanks for answering so quickly. – Pozinux Feb 10 '16 at 14:21
2

--nodeps is when we do not want to verify package dependencies.

If you will use it with rpm it will not verify the package dependencies, and the installed package might not work as it should.

If you will use it with rpm -e command, the package will be erased without giving you warning, if some other packages are dependent on the package you are trying to erase.

  • Ok thanks for the precisions. In fact I know what it does and doesn't. I just wanted to know in which case I would need to use this option. – Pozinux Feb 10 '16 at 14:21

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.