LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Uninstall package (https://www.linuxquestions.org/questions/linux-newbie-8/uninstall-package-4175520480/)

mintvx 09-29-2014 08:20 AM

Uninstall package
 
Can I uninstall package if it was installed not via the standard configure/make installation procedure:

$ ./configure
$ make
$ sudo make install

but via running setup script in src directory?

$ sudo python setup.py install

rtmistler 09-29-2014 10:17 AM

Not via a simple command unless the Makefile contains an uninstall option. Likely "clean" is not exactly that either by the way.

I'd look at the Makefile and see what it does for the "make install" and then reverse that, starting with the last action and reversing.

Likely there are directories that were established and populated, as well as executables placed somewhere, and maybe some symbolic links. It all depends what the source package install process did.

jdkaye 09-29-2014 10:21 AM

Quote:

Originally Posted by mintvx (Post 5246271)
Can I uninstall package if it was installed not via the standard configure/make installation procedure:

$ ./configure
$ make
$ sudo make install

but via running setup script in src directory?

$ sudo python setup.py install

Simple answer, no. You'll need to delete the files and folders created by the compilation process. There is a way of doing what you want but it involves installing the package checkinstall and then using it after the compilation phase.
jdk

bigrigdriver 09-29-2014 10:38 AM

Yes, kinda.

Reinstall with the --record option: python setup.py install --record installed.txt

Then uninstall: cat files.txt | xargs rm -rf

Read more here.

Then, instead of installing tarballs on your Debian system, create a debian package first, then install. Makes it easier to uninstall later.

To make a .deb of a python tarball.

More about creating Debian packages.

mintvx 09-29-2014 03:56 PM

Makefile contains an unistall option, though.

jkirchner 09-29-2014 05:00 PM

It would be
Quote:

# make uninstall
as root I believe since they provided the uninstall

mintvx 09-29-2014 05:40 PM

Quote:

Originally Posted by jkirchner (Post 5246527)
It would be as root I believe since they provided the uninstall

So, uninstall should work regardless of installation method, standard or via 'sudo python setup.py install'?

jkirchner 09-29-2014 08:29 PM

Quote:

Originally Posted by mintvx (Post 5246539)
So, uninstall should work regardless of installation method, standard or via 'sudo python setup.py install'?

It works with this (if they have the uninstall in their makefile)

Quote:

$ ./configure
$ make
$ sudo make install

It will not work with the other script. For that best to read through the script and see what it does and work backwards.

rtmistler 09-30-2014 07:27 AM

If the author of the package chose to put an uninstall option into their Makefile, then this would be the first choice seeing as it's the intended method by the package creator.

knudfl 09-30-2014 07:42 AM

Post #1 says : 'python setup.py install'

See post #4, @bigrigdriver :
Quote:

Reinstall with the --record option: python setup.py install --record installed.txt

Then uninstall: cat files.txt | xargs rm -rf

Read more here http://www.solver.io/wp/2013/10/10/p...-py-uninstall/ python-setup-py-uninstal

mintvx 09-30-2014 08:06 AM

Quote:

Originally Posted by knudfl (Post 5246873)
Post #1 says : 'python setup.py install'

See post #4, @bigrigdriver :

Yes, that is useful info. I didn't installed package yet. But using CheckInstall package mentioned in post #3 looks even more handy. Does anybody use CheckInstall to keep track of all files installed?

jdkaye 10-01-2014 01:16 AM

I use checkinstall when I compile my own software from source. It makes things much easier if I want to remove the program at some point. I just treat it as a package and get rid of it via the "sudo aptitude remove <name of program>" command. I am prompted to supply a package name by checkinstall during the installation process. It works a treat.
jdk


All times are GMT -5. The time now is 06:19 AM.