LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to uninstall software in Linux? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-uninstall-software-in-linux-118452/)

san_lss 11-21-2003 04:13 AM

How to uninstall software in Linux?
 
(1) If I have wrongly installed something into the Linux system, how do I uninstall it?

(2) I've heard that there will be a "core" file if something has been done wrongly in Linux. Will it be always having a "core" and where is it located?

I wish that I do not have to reinstall the whole linux system over and over again when I have wrongly installed something.

Please comment.

Thank you!

TheOneKEA 11-21-2003 04:30 AM

(1) Uninstalling software in Linux is a bit complex. If you use a package-based distro like a Debian-derivative or a Red Hat-derivative, then all you need is the appropriate removal command; i.e. on Red Hat, if you installed gaim and want to uninstall it:

rpm -e gaim

as root will do the trick. If you aren't using a package-based distro, then you'll need to find out where the program is, as well as where all of its associated files are (data, libs, manpages, etc). Then you can just delete them.

(2) A core file is generated by programs under Linux whenver they do something bad. Some of the reasons include: accessing memory that isn't theirs (SIGSEGV - Segmentation fault); issuing an illegal instruction (SIGILL - Illegal instruction - rare); a system bus error when the program tries to execute (SIGBUS - Bus error); and issuing an illegal floating-point instruction (SIGFPE - Illegal floating-point instruction).

One thing to remember about this is that programs with a setuid or setgid bit (i.e. the chmod u+s or the chmod g+s command was run on them) will not dump core because it could compromise security. Also, on kernels before 2.6, certain types of programs that use threads or do other advanced things might not dump core either, depending on the kernel.

You should NEVER need to reinstall the entire Linux distro to remove a single program, unless you remove a critical program that is part of the outer core of the system.

_KDF 11-21-2003 10:11 AM

if you used ./configure && make && make install then you can always make uninstall

TheOneKEA 11-21-2003 10:29 AM

Not all the time. Some program maintainers or authors don't add uninstall targets to their Makefiles. Larger, multi-program software packages might, but you shouldn't count on it. If you really need to be able to easily uninstall a large software package with lots of data files and such, IMO you should just build an RPM or fetch an RPM from somewhere.

vincebs 12-12-2003 07:36 PM

If I delete the directory that contains the source and the Makefile, how will I uninstall the software?

So I have to keep the source code for every piece of software I might eventually uninstall?

Also, what if the programmer didn't include a make uninstall command?

TheOneAndOnlySM 12-12-2003 09:25 PM

well, if you deleted the sources, just get them again, and do ./configure, and then make uninstall (sometimes you may have to go through make and make install and then do make uninstall)

if there is no make uninstall available, do ./configure, make, and then convert it to a package; this way, you can see where all the files would go (for example, makepkg in slack will create a .tgz file that when opened will show /usr, /bin and such with the files inside those dirs)

if you kno where the files are to go and you have already installed the program, just follow the directories in the package and use rm (remove command) manually deleting each individual file

*also, another thought is that if you create a package, just install the package and then uninstall the package using a basic uninstall package command for your distro

vincebs 12-13-2003 12:12 AM

What is this makepkg program? Is it only in Slackware? If so, how do I convert the sources into a package?


All times are GMT -5. The time now is 05:50 PM.