Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you uninstall in *nix?

One of the things I still can't wrap my head around is rules of thumb to uninstall programs in *nix environments. Most of the time I'm happy to let the sleeping dogs lie and not uninstall software that I no longer need. But from time to time I end up with several Apaches, svn, etc.

So far here's what I know about dealing with this:

1) if you installed using apt-get or yum, there's an uninstall command. Very rarely there's an uninstall script somewhere in the app's folder, something like uninstall.sh

2) to figure out which particular install is being called from the command line use "type -a" command

3) use "sudo find / | grep" to find where else stuff might be installed (from what I understand type only looks for things that are in the PATH variable)

4) Add/change order of things in PATH to make the desireable version of the app to be first in line or add an alias to .bashrc

5) delete the stuff I no longer want. This one is easy if the application was installed only in one folder, but tricky if there are multiple. One trick that I've heard of is running a find with a time range to find all the files that changed arount the time when the install happened - that roughly shows what was changed and added.

Do you have anything to add/correct?

like image 235
deadprogrammer Avatar asked Jan 14 '09 16:01

deadprogrammer


People also ask

How do I reinstall Nix?

Installation. To install Nix, run curl -L https://nixos.org/nix/install | sh as a non-root user and follow the instructions. Alternatively, you may prefer to download the installation script and verify its integrity using GPG signatures. Instructions for doing so can be found here: https://nixos.org/nix/download.html.


1 Answers

If you didn't use a package manager (rpm, apt, etc), then you probably installed from source. To install, you performed a process along the lines of ./configure && make && make install. If the application is well-behaved, that "install" make target should be coupled with an "uninstall" target. So extract the sources again, configure again (with the same paths), and make uninstall.

like image 168
Tyler McHenry Avatar answered Sep 23 '22 22:09

Tyler McHenry