LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-29-2014, 08:20 AM   #1
mintvx
Member
 
Registered: Aug 2014
Distribution: Debian 7.0
Posts: 101

Rep: Reputation: Disabled
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
 
Old 09-29-2014, 10:17 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 09-29-2014, 10:21 AM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by mintvx View Post
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

Last edited by jdkaye; 09-29-2014 at 10:24 AM.
 
1 members found this post helpful.
Old 09-29-2014, 10:38 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
1 members found this post helpful.
Old 09-29-2014, 03:56 PM   #5
mintvx
Member
 
Registered: Aug 2014
Distribution: Debian 7.0
Posts: 101

Original Poster
Rep: Reputation: Disabled
Makefile contains an unistall option, though.
 
Old 09-29-2014, 05:00 PM   #6
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 945

Rep: Reputation: 297Reputation: 297Reputation: 297
It would be
Quote:
# make uninstall
as root I believe since they provided the uninstall
 
Old 09-29-2014, 05:40 PM   #7
mintvx
Member
 
Registered: Aug 2014
Distribution: Debian 7.0
Posts: 101

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jkirchner View Post
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'?
 
Old 09-29-2014, 08:29 PM   #8
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 945

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by mintvx View Post
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.
 
Old 09-30-2014, 07:27 AM   #9
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 09-30-2014, 07:42 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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
 
Old 09-30-2014, 08:06 AM   #11
mintvx
Member
 
Registered: Aug 2014
Distribution: Debian 7.0
Posts: 101

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
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?

Last edited by mintvx; 09-30-2014 at 03:21 PM.
 
Old 10-01-2014, 01:16 AM   #12
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you uninstall just one package with Synaptic? mischugenah Linux - Newbie 12 12-10-2012 08:33 PM
How to uninstall a package? kryznic Linux - Newbie 30 03-11-2010 08:25 AM
can't uninstall package pru Linux - Software 2 03-12-2008 02:56 AM
how to uninstall a package vshenoy Linux - Newbie 2 04-29-2006 03:35 PM
RH 8.0 package uninstall Sargek Linux - Software 5 01-05-2003 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration