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
|
Quote:
http://www.linuxquestions.org/questi...ofware-271990/ Google is your friend. jdk |
The command in above link works only if you still have the configured source directory yet.
|
Quote:
Code:
make install cheers, jdk |
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. |
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 |
Quote:
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 |
Quote:
cheers, jdk |
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 |
Quote:
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 |
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. |
Quote:
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 |
That's right.
|
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. |