Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uninstalling on linux

I'm new to compiling and installing programs on linux. I understand the common process is to do ./configure

make

make install

I'd like to know if there is some way I can "rollback" if I make a mistake somewhere or if something goes wrong.

like image 479
DavidL Avatar asked Jun 29 '26 00:06

DavidL


1 Answers

Agree with other answers, and I wanted to clarify a bit. If my understanding is correct, typically ./configure is a script that makes sure / sets up your system so that compilation will go correctly. Then make runs a Makefile that actually compiles. Then make install runs the makefile with install as a parameter that actually copies your binaries and config files to the appropriate (as determined by the script author) system directories, which is why often make install must be run with elevated privileges.

Often the make script takes an uninstall parameter that actually erases everything that was copied to system directories. In my experience, this isn't always going to be a clean process. There's no fireproof way to roll back without ensuring yourself that all changes are tracked perfectly and writing the rollback script yourself.

In short, try make uninstall and if that doesn't work and you can't figure it out yourself, try posting on a mailing list or forum pertaining to the particular product in question.

Edit for more info: just running make should get you everything you need to run a program, as long as you keep your working directory as wherever you ran make from. That is, make will create all your binaries and config files, etc, and you can use the software fine from that directory. You won't have any globally accessible binaries or proper environment variables, though, if you don't copy things to system directories, such as with make install. So if you're just trying to run a self-contained binary that isn't software that something else will rely on, you don't actually need to run make install and won't have to worry about rolling back. Everything will be contained within your original working directory.

like image 190
taz Avatar answered Jul 01 '26 17:07

taz