Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I installed Apache 2.4 from a source tar, and there seems to be no "make deinstall" or "make uninstall" options in the makefile in the extracted directory.
How can I remove the installed Apache server from my system?

The system is FreeBSD; I avoided using the ports because the installation was for a test server with a lower version of OpenSSL.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You remove the files that were installed by hand, using the rm command.

(If you don't know which files you need to remove sometimes it helps to make install again and look for the files that were updated - you've probably made yourself quite a mess though.)


The next time you need to build a test environment you should think it through and plan for the eventual removal of that environment (e.g. by using --prefix=/usr/local/apache-test when you run configure so all the installed files are conveniently under one directory).
This requires a little more work on your part, but is less likely to make a mess on your server.

A better solution would be to use FreeBSD's jail functionality to fully confine your test environment. This has a steeper learning curve (and uses a lot more disk space), but it is The Right Thing in terms of isolation/containment.

share|improve this answer
    
I see I see, does configuring with the default PREFIX put files all over the place? –  user2738698 Apr 17 at 21:33
1  
The default prefix is probably /usr/local (your configure output will tell you for sure), which means you probably have files in /usr/local/bin, /usr/local/sbin, /usr/local/lib, etc. -- you'll need to track them all down to fully purge the installation. (If you installed a downgraded OpenSSL you'll have to do the same for that as well) –  voretaq7 Apr 17 at 21:35
    
So instead, I should make prefix something like /usr/local/apache/and then if I want to remove, I would just remove /usr/local/apache? That results in a complete purge? –  user2738698 Apr 17 at 21:44
    
@user2738698 Yup (unless you intentionally put stuff outside that directory on your own - don't do that :). But in your case it sounds like you've already installed with the default prefix, so now you need to clean up the mess the installation made. Honestly jails are much neater for this sort of thing though - and you get a completely isolated environment you can start/stop as needed so no worries about running a vulnerable service and getting your whole system hacked - if someone breaks in all they get is the jail. –  voretaq7 Apr 17 at 21:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.