Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

Hey everyone. I'm using the Ubuntu server for some time now. Everything is working fine, installing packages is a piece of cake. Usually I use aptitude or apt-get for package management. But...! There are cases when I need to install a package from a source. No problem usually I do ./configure, make install and so on. But...! There are also cases I want to upgrade a package I manually installed from a source. This is where things get blured :).

My question: What is a proper way to install custom packages. I'm thinking of install/uninstall process like on Windows. I would like to remove all the package files after the package was manually installed using make/install command.

I know there is a script through which you can run make commands and later it knows how to remove the package and all related files/paths but can not remember the name.

Please help! Thx 10x!

share|improve this question

migrated from stackoverflow.com Oct 28 '11 at 11:06

This question came from our site for professional and enthusiast programmers.

You can roll your own .deb packages, that way you can install/remove with dpkg and/or apt-get.

see this link.

share|improve this answer
hum... can you please write the example for memcache installation code.google.com/p/memcached/wiki/NewInstallFromSource and then how would you uninstall it. Thx. – xpepermint Aug 13 '10 at 14:42
There's also alien. – nmichaels Aug 13 '10 at 14:43

Are you thinking of make uninstall?

share|improve this answer
Hum... not really... I need some kind of "wizard" that knows what to delete if I want to delete a package. How would you use make uninstall? Would this delete all related paths? – xpepermint Aug 13 '10 at 14:36
For packages installed with make install, make uninstall will usually delete the files that make install installed. Not always though, and it probably won't always delete config and data files for example. That is one of the downsides to manual installation, and one of the reasons package managers like dpkg etc were invented. There could be some daemon or something that monitors the filesystem and keeps track of what programs use what files and can assist in cleaning up after deinstallation but I am not aware of any. Is that what you are after? – Kurt Aug 13 '10 at 14:39
Yup... we understand each other. A deamon should be a good solution ... – xpepermint Aug 13 '10 at 14:46

You can easily knock up an uninstall script. It is not that hard, I wrote some thoughts and explanation on my blog.

The blog walks you through the entire process. In addition I link to a helper script, that automates some steps, reducing them down to:

make install DESTDIR="$PWD/staging"
cd staging
sudo transfer-staged-package packagename

To uninstall, your application later you simply issue:

sudo /usr/local/bin/uninstall-packagename

Read the blog post, though as it contains many more tips and tricks.

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.