• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

–force V/s –nodeps : rpm command options to install or uninstall a package

by admin

These rpm options can potentially corrupt a Linux server so severely a reinstall may become necessary. So be cautious while playing with them.

–force V/s –nodeps

–force

Ignore package and file conflicts for install — package might stop working properly leading to serious issues

–nodeps

Do not check dependencies — package might not work properly after using this flag ( or dependent packages might stop working )

Often one RPM package requires one or more other RPM packages to work correctly. Sometimes an RPM may depend on a particular version of another RPM. The complex interactions are maintained by the yum and rpm tools. Using either of the –force or –nodeps can damage the package relationships and lead to unrelated failures that are extremely difficult to diagnose and repair.

By using option –force for installation will not guarantee that installed package will work correctly, the package files are installed without regard whether they will work with the rest of the system.

Similarly, usage of –nodeps for install and uninstall might cause serious trouble to packages which still depend on that package. During installation rpm(8) will not install necessary packages for actual rpm to work properly causing serious dependency problems.

Best Practice

Never forcibly install an RPM package. Only use the –force or –nodeps option if your support team suggest you to do so. There are scenarios where these options can be useful but they have a strict use case.

Recovery

To verify the RPM library correctness after such having used –force or –nodeps check the RPM database like this:

# rpm -Va
#

If the RPM database is correct, there will be no output. Certain files are flagged as configuration files which are expected to be customized; these are marked by the letter “c” in the second field else the second field will be blank. Any other line will represent a failure detected by RPM. The filename will be the third field. To map the filename back to the RPM package do this:

# rpm -qf /bin/bash
bash

If rpm was part of the core O/S packages, for example, glibc, reinstalling Linux may be the best solution because almost every application relies upon the general C library. Please note that yum as a comparable option which can cause similar damage.

Filed Under: Linux

Some more articles you might also be interested in …

  1. RHEL / CentOS : How to rebuild LVM from Archive (metadata backups)
  2. killall: command not found
  3. hdparm Command Examples in Linux
  4. debuild: command not found
  5. dolphin: command not found
  6. How to use the “screen” command in Linux
  7. CentOS / RHEL 5,6 : How to Change the timezone
  8. mpstat Command Examples in Linux
  9. e4defrag: command not found
  10. Oracle Database Environment Variables and Their Functions

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright