LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-29-2009, 12:46 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
Remove package


I installed a package ( webmin ) that is compiled from a source program , I would like to remove this package now , if I can't find make uninstall from source program , how can I remove it ? thx
 
Old 05-29-2009, 01:07 AM   #2
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 ust View Post
I installed a package ( webmin ) that is compiled from a source program , I would like to remove this package now , if I can't find make uninstall from source program , how can I remove it ? thx
Have a look here:
http://www.linuxquestions.org/questi...ofware-271990/
Google is your friend.
jdk
 
Old 05-29-2009, 01:21 AM   #3
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
The command in above link works only if you still have the configured source directory yet.
 
Old 05-29-2009, 01:27 AM   #4
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 contusion View Post
The command in above link works only if you still have the configured source directory yet.
You probably need to remove the installed bits manually. The most important are usually found in /usr/local/bin. If you download the source code again and repeat the compilation problem and look at what
Code:
make install
does then you can probably get the remaining files.
cheers,
jdk
 
Old 05-29-2009, 02:22 AM   #5
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
thx replies ,

I tried to download the source program and use make uninstall , it not work, use configure , then use make uninstall is also not work , tried make clean not work , what I should try now ? thx



# make uninstall
make: *** No rule to make target `uninstall'. Stop.
 
Old 05-29-2009, 02:29 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
ust, you have to do the same installation you did the first time: ./configure, make, make install, using the same installation path if you specified --prefix as option to configure. In this way the make install process will simply overwrite the existing files. In case there is not a "uninstall" target in the Makefile, you can run the make install step saving the output to a file:
Code:
# make install 2>&1 | tee install.log
then read this file line by line and remove the installed files one by one.
 
Old 05-29-2009, 02:58 AM   #7
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by colucix View Post
ust, you have to do the same installation you did the first time: ./configure, make, make install, using the same installation path if you specified --prefix as option to configure. In this way the make install process will simply overwrite the existing files. In case there is not a "uninstall" target in the Makefile, you can run the make install step saving the output to a file:
Code:
# make install 2>&1 | tee install.log
then read this file line by line and remove the installed files one by one.

thx reply ,

this is part of install.log

install log
=======
./src/helpers/mkdir.sh /usr/local/apache/bin
./src/helpers/mkdir.sh /usr/local/apache/bin
./src/helpers/mkdir.sh /usr/local/apache/libexec
./src/helpers/mkdir.sh /usr/local/apache/man/man1
./src/helpers/mkdir.sh /usr/local/apache/man/man8
./src/helpers/mkdir.sh /usr/local/apache/conf
./src/helpers/mkdir.sh /usr/local/apache/htdocs
./src/helpers/mkdir.sh /usr/local/apache/htdocs/manual
./src/helpers/mkdir.sh /usr/local/apache/icons
./src/helpers/mkdir.sh /usr/local/apache/cgi-bin
./src/helpers/mkdir.sh /usr/local/apache/include
./src/helpers/mkdir.sh /usr/local/apache/include/xml
./src/helpers/mkdir.sh /usr/local/apache/logs
./src/helpers/mkdir.sh /usr/local/apache/logs
./src/helpers/mkdir.sh /usr/local/apache/proxy

you mean simply remove the directory --> /usr/local/apache ?

thx
 
Old 05-29-2009, 03:06 AM   #8
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 ust View Post
thx reply ,

this is part of install.log

install log
=======
./src/helpers/mkdir.sh /usr/local/apache/bin
./src/helpers/mkdir.sh /usr/local/apache/bin
./src/helpers/mkdir.sh /usr/local/apache/libexec
./src/helpers/mkdir.sh /usr/local/apache/man/man1
./src/helpers/mkdir.sh /usr/local/apache/man/man8
./src/helpers/mkdir.sh /usr/local/apache/conf
./src/helpers/mkdir.sh /usr/local/apache/htdocs
./src/helpers/mkdir.sh /usr/local/apache/htdocs/manual
./src/helpers/mkdir.sh /usr/local/apache/icons
./src/helpers/mkdir.sh /usr/local/apache/cgi-bin
./src/helpers/mkdir.sh /usr/local/apache/include
./src/helpers/mkdir.sh /usr/local/apache/include/xml
./src/helpers/mkdir.sh /usr/local/apache/logs
./src/helpers/mkdir.sh /usr/local/apache/logs
./src/helpers/mkdir.sh /usr/local/apache/proxy

you mean simply remove the directory --> /usr/local/apache ?

thx
If the only things contained in /usr/local/apache are shown above, then yes.
cheers,
jdk
 
Old 05-29-2009, 03:09 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Nope. It is more safe to remove the files only, then directories if they remain empty. Just begin from the end of install.log going backward.


PS - Use
Code:
tac install.log
if you want to see the reversed file!

Last edited by colucix; 05-29-2009 at 03:11 AM.
 
Old 05-29-2009, 03:49 AM   #10
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by colucix View Post
Nope. It is more safe to remove the files only, then directories if they remain empty. Just begin from the end of install.log going backward.


PS - Use
Code:
tac install.log
if you want to see the reversed file!
thx reply ,

sorry to my fool , I am not understand .

you mean remove files and then directories ? just do this two things ? how about the library file ( eg. .o ) that created when compile ? thx
 
Old 05-29-2009, 03:56 AM   #11
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Those are not installed files, but temporary object files created from the compilation step (make). Usually you have to do make clean, to remove them, but since you want to completely remove webmin from your system, once you have finished to uninstall it, you can remove the source directory.

In summary, read the install.log from the end to the beginning and try to reverse every action taken from make install (be it to copy/install a file, create a directory, make a link and so on). Then remove the source directory. That's it.
 
Old 05-29-2009, 04:19 AM   #12
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by colucix View Post
Those are not installed files, but temporary object files created from the compilation step (make). Usually you have to do make clean, to remove them, but since you want to completely remove webmin from your system, once you have finished to uninstall it, you can remove the source directory.

In summary, read the install.log from the end to the beginning and try to reverse every action taken from make install (be it to copy/install a file, create a directory, make a link and so on). Then remove the source directory. That's it.

thx reply ,

what I need to do is ,

1. remove all files / directories when the installation process ( rm -rf ./path )
2. make clean ( to remove the library )
3. remove the source directory .


is that right ?

thx
 
Old 05-29-2009, 04:53 AM   #13
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
That's right.
 
Old 05-29-2009, 05:27 AM   #14
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Some programs don't provide make uninstall command.
You can build and install it and from installation log you can make out where in the file system the program installs itself. Then you can delete the files.
It's better to use a package manager or
while installing it give few options to configure
e.g.
./configure --prefix=/opt/package-name
This would install all of the program files to the /opt/package-name directory. Then if want to uninstall it just delete package-name directory.
And ofcourse you need to put the package-name/bin directory to path for easy accessing.
 
  


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 to remove a package riba43 SUSE / openSUSE 12 07-04-2007 11:52 AM
Remove a package raysr SUSE / openSUSE 3 03-22-2006 10:47 AM
how to remove a package abd_bela Debian 6 05-14-2005 12:01 PM
remove package spidna Debian 3 02-26-2005 06:26 PM
remove package jbzy3000 Fedora 1 02-14-2005 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:42 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