LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Remove package (https://www.linuxquestions.org/questions/linux-software-2/remove-package-729236/)

ust 05-29-2009 12:46 AM

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

jdkaye 05-29-2009 01:07 AM

Quote:

Originally Posted by ust (Post 3556170)
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

veerain 05-29-2009 01:21 AM

The command in above link works only if you still have the configured source directory yet.

jdkaye 05-29-2009 01:27 AM

Quote:

Originally Posted by contusion (Post 3556190)
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

ust 05-29-2009 02:22 AM

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.

colucix 05-29-2009 02:29 AM

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.

ust 05-29-2009 02:58 AM

Quote:

Originally Posted by colucix (Post 3556235)
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

jdkaye 05-29-2009 03:06 AM

Quote:

Originally Posted by ust (Post 3556262)
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

colucix 05-29-2009 03:09 AM

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! ;)

ust 05-29-2009 03:49 AM

Quote:

Originally Posted by colucix (Post 3556271)
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

colucix 05-29-2009 03:56 AM

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.

ust 05-29-2009 04:19 AM

Quote:

Originally Posted by colucix (Post 3556319)
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

colucix 05-29-2009 04:53 AM

That's right.

veerain 05-29-2009 05:27 AM

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.


All times are GMT -5. The time now is 03:52 AM.