0

I recently installed it++, a C++ signal processing library, from http://itpp.sourceforge.net/4.3.1/index.html by downloading the zip file, doing cmake, make and make install.

I now want to completely undo the installation and re-install again. This is a basic question, but how do I remove it++ in Ubuntu? In general, what commands do I use to remove installed C/C++ libraries in linux?

Thanks.

Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175
user2510050
  • 1
  • 1
  • 3
  • make uninstall doesn't seem to work. Am I out of luck? – user2510050 Jul 30 '14 at 03:55
  • 1
    @user2510050 you have to run `make uninstall` in the same directory as where you run `make install` – bikram990 Jul 30 '14 at 04:08
  • @bikram990 yes, I ran make uninstall in the same directory that I ran make install, but uninstall is not a defined target in the makefile. polarysekt suggested installing it through apt-get which seems like an easy way to avoid headache. – user2510050 Jul 30 '14 at 04:18
  • @user2510050 Thankx for pointing out, I was not aware that its not defined in the makefile. – bikram990 Jul 30 '14 at 12:05
  • @user2510050 , you can `uninstall` software that was installed with `sudo make install` using `checkinstall` (`sudo apt-get install checkinstall`). It generates a deb file that you can then install using `dpkg -i deb-file` and then uninstall with `dpkg -r package_name`. More info here (http://stackoverflow.com/a/14516283). Be sure to change the name of the package when you run `checkinstall`. – jespestana May 19 '16 at 12:55

1 Answers1

0

The libitpp-dev package is available in Ubuntu:

https://launchpad.net/ubuntu/+source/libitpp


Read carefully the post that Ben suggested as duplicate in his comment -- What's the opposite of 'make install', ie. how do you uninstall a library in Linux? which suggests a reversal akin to the

# make uninstall 

that was suggested by shengy in his comment, to be run in the directory from which you installed originally (re: bikram990)

Be sure to read carefully the comments to avoid common 'gotchas', including accidentally removing dependencies related to other packages.

As is stated in the answers of that post, the second option is figuring out the build steps and manually reversing them, using the

$ make -n uninstall

command to figure out what those were. If it turns out you do have to do some pruning manually, again, be wary of what you remove in case you accidentally break other packages in the process.


It is recommended to install the package via your package manager to avoid complications and possible problems such as this, especially if you're not 100% sure of what you're doing with cmake, or at least a little wary about how to proceed in the case of an uninstall.

The package can then be installed with:

$ sudo apt-get install libitpp-dev

And this very reason is a very good one to stick with official repositories/packages, as a reversal can be done with:

$ sudo apt-get uninstall libitpp-dev

And your package manager will handle the mundane details, such as dependency checking, updates, and will generally assure that you will not break any other packages when installing or uninstalling.

Additionally, your official package may contain some Ubuntu-specific patches.


It's understandable to install packages manually in the case that a particular package is not available through the official channels, but then you're privy to the whims of the particular package authors, who may not have tested functionality thoroughly on your particular system.

Good Luck.

Community
  • 1
  • 1
polarysekt
  • 562
  • 1
  • 5
  • 17
  • Thank you very much! I was not aware itpp was available through apt-get. In retrospect, I should have done "apt-cache search itpp" before trying to install the library manually. – user2510050 Jul 30 '14 at 04:15
  • Ideally a pkg is up-to-date enough for your purposes. There are times where distros get behind, case-in-point, `lmms`. While I had been using v0.4.10-2.3 on my Debian distro, I `emerged` the package on one of my Gentoo distros and was ultimately surprised to see v1.0.0, with all new features and a slick new interface. Checking the authors' site @ sourceforge, I discovered they were up to 1.0.2-- I HAD to have it but found that it was still not available on Debian, but had been marked as urgent. So I downloaded and built it, but just ran in place instead of installing, to avoid this problem. – polarysekt Jul 30 '14 at 04:26
  • NOTE: it's _never_ without a bit of frustration, as running in place required a bit of _tweaking_, to move the compiled .so's (the instrument plugins -- essentially everything useful) to a different folder so the app could find it. In the case of a library, building in place may require a little finesse with the end build process, possibly using a different link path `-L` and include path `-I` as they'd be somewhere like `~/mybuilds/` or the like. – polarysekt Jul 30 '14 at 04:30