Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I used source code to build one package such as below:

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --with-package-name="Myplugin" --with-package-origin="http://www.ubuntu.org/" --enable-gtk-doc --disable-static
make
make install

But unfortunately, i discovered that its the latest version, and has lot of bugs, so i need to remove it/uninstall it. But how can i do so? I tried make clean; make uninstall but still i see it exist:

# pkg-config --list-all | grep Myplugin
myplugin-....
$ ls /usr/lib/myplugin/libXYZ.so
exist....

How do you remove this now?

share|improve this question

4 Answers 4

up vote 53 down vote accepted

Usually you can just use:

make uninstall

or

sudo make uninstall

if the app was installed as root.

But this will work only if the developer of the package has taken care of making a good uninstall rule.

In the future to avoid that kind of problems try to use checkinstall instead of make install whenever possible (AFAIK always unless you want to keep both the compiled and a packaged version at the same time). It will create and install a deb file that you can then uninstall using your favorite package manager.

make clean usually cleans the building directories, it doesn't uninstall the package. It's used when you want to be sure that the whole thing is compiled, not just the changed files.

share|improve this answer
    
I did that too. But still it exist, as shown pkg-config and ls /usr/lib/myplugin/libXYZ.so –  YumYumYum Dec 12 '11 at 11:54
14  
+1 for using checkinstall - it makes this whole problem evaporate. –  Oli Dec 12 '11 at 12:00
5  
@Google: If make uninstall doesn't work, you'll need to track what make install did and undo it manually. –  Javier Rivera Dec 12 '11 at 12:42
    
Does make uninstall work after a make clean? I believe to need to make sure it's still ./configured'd the same way. –  user606723 Dec 12 '11 at 16:10
2  
Another thing to keep in mind is that if make install was run as root (e.g., sudo make install), which is typically the case, it's virtual always necessary to run sudo make uninstall to remove the software. –  Eliah Kagan Jul 9 '13 at 1:46

I do not think this is a bug, it would be a good idea to read about and learn to use checkinstall when installing from source.

you can install checkinstall from the repositories, a short description of the package;

CheckInstall keeps track of all the files created or modified by your installation script ("make install" "make install_modules", "setup", etc), builds a standard binary package and installs it in your system giving you the ability to uninstall it with your distribution's standard package management utilities.

These links below may be helpful to get a better understanding. http://en.wikipedia.org/wiki/CheckInstall

http://checkinstall.izto.org/

share|improve this answer
    
Thank you! I will definitely go through the website... –  nik90 Jan 20 '11 at 22:45

This is not a bug - compiling from source is an unsupported method of installing software that bypasses the package management system (which is used by the Software Centre) completely.

There is no standard way that software compiled from source is installed or uninstalled so no way Ubuntu can know what to do. The software is not even listed as an installed program.

You should follow the distributor's instructions for installation and removal of such custom software. You could also contact the developer to ask for them to create a Debian package so that the package management system can be used.

share|improve this answer

It is not a bug, it is what happens when developers resort to distribution via source and not via the native packaging methods.

You can get your source files to become debian packages by using checkinstall or dhbuild. Honestly, in my opinion - new users should avoid installing from source, and developers should avoid distributing by source only.

share|improve this answer
    
I know but sometimes it is unavoidable...In this case it was just a small game which is not really necessary but sometime back I had to install MATLAB a computational tool used in my university and had to install it by the source since they did not have a deb file for ubuntu...But I will definitely go through the methods checkinstall and dhbuild...thanks –  nik90 Jan 20 '11 at 22:44

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.