Unfuck centos

Install net-tools

yum install -y net-tools

RPM db is fubar

Error:

rpmdb: Thread/process 7926/140488136480512 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed

Fix (rebuild the rpm db): .. code-block:: console

$ mv /var/lib/rpm/__db* /tmp/ $ rpm –rebuilddb $ yum clean all

Show version of package with yum

yum info PACKAGE

Show multiple versions of a package

dnf --showduplicates search PACKAGE

Install specific version

dnf install PACKAGE-VERSION

dnf show security updates

dnf updateinfo list updates security

dnf install security updates

dnf update --security

stop bash from asking to install something after a mistype

It’s the fault of the PackageKit-command-not-found package. What a disaster.

dnf remove PackageKit-command-not-found