how to uninstall software on Linux
If I install some software on a Linux system by building it with make and then make install, is there a command to give Linux to tell it to uninstall? I am asking if there is a "make uninstall"?
If I did the "make install" command and messed up, how can I undo it?
When I was trying to build a kernel, with the instructions to build it, the PC crashed. This was for a 2.6.2X kernel. I rebooted the machine, and then it did not run right. I could have done something wrong. How can I undo it?
Does Linux have a backup and restore capability? Can you set a restore point?
There is a "make uninstall" target - but only if the developers implement one in the Makefile (most do).
If it's a kernel though, usually you have to copy the kernel image to your /boot directory for it to be "installed". I don't think kernel's have a "make uninstall" target though - as they usually compile everything into the image, and keep kernel modules in a single directory (I'm not sure where). I mean, if you re-issue the "make" command in the kernel source directory, it should just pick up where it left off.
The basics for building a kernel are, simply:
Thank you for the comment.
The PC crashed before it finished the build, so I did not get to the install part. It crashed on the make.
I built a kernel that had the image already there in /boot, but it was not called bzImage. It was called vmlinuz-2.6.2X. I did not use make bzImage. I just used make. Does it make a difference? Is that why I had problems with getting it to boot? The files bzImage and the vmlinuz seemed to be the same files but a different name. Does the boot image need to be called "bzImage" and does it need to be placed in /boot? I think that the make install puts the image in /boot. Do I still need to copy it there? What do I do with the vmlinuz file?
If there is no uninstall in the Makefile, does that mean that you can not uninstall it and that it is stuck on your Linux?
I've never used "make install" when building a kernel. But if a custom-compiled kernel doesn't work, just delete it from the /boot directory.
I have always just done the process I outlined above, as I know exactly which kernels are mine, and which kernels are installed by my distribution.
Here's a decent guide on compiling a 2.6 kernel. Just try it with the most recent kernel source.
Which distribution are you using, anyways, and why are you trying to compile your own kernel? Assuming you're a newbie, you should always stick to the kernels provided by your distribution's package manager - custom kerneling should only really be done if you (A) know exactly what you're doing, (B) need to change something to fix a problem with your current kernel, or (C) are trying to create a base kernel for installation on another system if you're, say, creating your own distribution.
Her's a link to a tutorial I wrote for compiling a generic package from source.
[With some input from others to make it more understandable.]
And yes, the command to remove the package is make uninstall.
If you're new and already futching with make a kernel, it may end up being less frustrating to get your feet a bit wetter by having a better understanding of the ins and outs of building from source.
It may be that your pc crashed because it was overloaded, which I don't think should have happened from compiling a kernel.
I've never had the need to custom build a kernel but I wouldn't think it would require a huge amount of resources to the point the pc crashed.
Only time that happened to me I was installing Gentoo to a pentium 3 laptop.
[I do so love to torture a machine :)]
I read windtalker10's tutorial and that was great help for newbies, like myself. During my research on "How to uninstall packages", I encountered another article that says something like;
when you need to manually uninstall packages built from source, you need to look into ./configure file and find locations of where files were copied and then delete those files from each directory.
Is this the right procedure if "make uninstall" is not available? Following what's in ./configure and deleting files based on it cleans out the system? I believe Linux doesn't have registory like Windows does, so I guess I don't need to worry about it, right? (As you can see, I'm coming from Windows environment (trashed it and migrated to Linux environment now :)
Thank you in advance.
|All times are GMT -5. The time now is 11:43 PM.|