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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. What happens in the Background when you execute the “useradd” command under Linux
  2. How to copy directories recursively using rsync while excluding specific files
  3. How to Configure Interface(s) in promiscuous mode on CentOS/RHEL 7 (persistently)
  4. How to Configure Interface bonding (NIC Teaming) on Oracle Linux 6
  5. lvremove Command Fails With Error “LVM – Can’t remove open logical volume”
  6. CentOS / RHEL : How to resize (extend) existing Physical Volume (PV)
  7. CentOS / RHEL 6,7 : How to disable or delete virbr0 interface
  8. CentOS / RHEL : How to collect sosreport
  9. CentOS / RHEL : How to delete LUKS encrypted device
  10. How to Remove virbr0 and lxcbr0 Interfaces on CentOS/RHEL 6,7

You May Also Like

Primary Sidebar

Recent Posts

  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • How to rename a KVM VM with virsh
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary