Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm aware of the post: How do I remove apache installed with make install and use apache from the repositories?.

I installed httpd2.4 from source. But for httpd2.4, there is no make uninstall available. Are there any easy ways to purge httpd2.4 built and installed from source?

share|improve this question

I did it this way:

NOTE: please, read carefully, don't break your operating system.

The Idea: get files that appear after "make" (build). Then search those files on system and remove them.

Uninstall files installed from a source code tar-ball - nixCraft

 - entered to source files of httpd-2.2/ folder.
 # need to clean previous build, and get empty build files snapshot.
 - make clean 
 # get empty build snapshot.
 - find . print | tee make.b4 
 # build project.
 - ./configure && make 
 # get files snapshot after build.
 - find . print | tee make.after 
 # get difference before and after build.
 - diff -y --suppress-common-lines make.b4 make.after | tee httpd_orig 
 # perform needed formatting.
 - cat httpd_orig | column -t | tr -d '>' | tr -d ' ' | sponge httpd_orig 
 # get only files name.
 - cat httpd_orig | xargs -n1 basename | tee httpd_orig_files 
 # get system files snapshot.
 - find /  \( -path /boot -o -path /dev -o -path /home -o -path /lost+find -o -path /media -o -path /mnt -o -path /proc -o -path /root -o -path /run -o -path /tmp -o -path /sys -o -path /var -o -path /opt \) -prune -o -type f -print | tee httpd_on_system 
 # run python script do remove files created on build project we find on system.
 - python 

# File:
# Uninstall httpd 2.2 installed from source.
import os

# read file with build project files name.
with open("httpd_orig_files", "r") as f:
    files = f.readlines()

httpd_orig = list()
for line in files:
    # create a list of build files, strip remove newlines.

# print files name from project build.
print httpd_orig 

# open file with files paths on system.
with open("httpd_on_system", "r") as f:
    httpd_files = f.readlines()

for hfile in httpd_files:
    item = hfile.strip()
    filename = os.path.basename(item).strip()
    status = filename in httpd_orig
    if status:
        print "{:<10} {:50} {}".format(status, filename, item)
            # remove files from system.
        except Exception as e:
            print e
share|improve this answer

Your Answer


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.