20080608 aw i just deleted free - plembo/onemoretech GitHub Wiki

title: Aw &@*%!, I just deleted "free" link: https://onemoretech.wordpress.com/2008/06/08/aw-i-just-deleted-free/ author: lembobro description: post_id: 511 created: 2008/06/08 16:13:24 created_gmt: 2008/06/08 16:13:24 comment_status: open post_name: aw-i-just-deleted-free status: publish post_type: post

Aw &@*%!, I just deleted "free"

Sometimes things go wrong. That’s true in life, and doubly true with computers.

This morning, whilst aggressively proceeding with a manual “uninstall” of a built-from-source app that insinuated itself into /usr/bin, I accidentally deleted the Linux free utility from my Red Hat based CentOS workstation.

Recovering from this faux pas was a two-step process.

First, find out which of the dozens of base packages contains free. Because the name of the binary is “free”, googling around is going to be an enormous waste of time. Fortunately, like all Red Hat inspired systems, mine keeps a record of all packages installed, including their contents, in the local [rpm](http://www.rpm.org) database.

[root@test ~]# rpm -qf /usr/bin/free

Got me my answer.

[root@test ~]# procps-3.2.7-8.1.el5.

To get yum to reinstall it (because I wanted the latest version for my distro and didn’t want to have to go up to a mirror and download and install it manually with a rpm -ivh --force [package name]), I first had to do an unconditional delete of the package record from the rpm database.

[root@test ~]# rpm -e --justdb --nodeps procps

Finally, I just issued the command to have yum install the package, as if for the first time.

[root@test ~]# yum install procps

Boy, that was easy.

Copyright 2004-2019 Phil Lembo