Cleanly removing linux applictions

Yohhan

Senior member
May 17, 2002
263
0
0
How can I cleanly remove programs like apache and msyql? For reinstallation, or just plain removal?

For instance, I'm having problems with my mysql server. I was able to get it setup okay, but I don't know how to remove it and start over short of reformatting the system. What do I need to do?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Depends on how you installed them.

If you used RPM's then try using the rpm tools to uninstall them, if you set up any databases, then delete them.

If you installed them from source then check out the /usr/local directory because that's the default place to stick custom created programs and files.

Check out the documentation and man files, generally you can find all the configuration files and stuff in /etc directory. Try deleting them and restoring them to the default configurations.

If you just want to turn the services off and aren't worried about the disk space you can simply disable the start up script in the runlevels for that particular service.

If your using a thing like Yum or Apt for package managment they have options to purge configuration files, since they generally leave your customized ones by default (for safety).
 

Cheetah8799

Diamond Member
Apr 12, 2001
4,508
0
76
rm -rf is very dangerous. use with caution, as it will remove ANYTHING AND EVERYTHING under the subfolder you tell it to delete.

Same for rm -f if you don't watch what you're doing.


As drag said, rpm installations are fairly easy to remove. Installations from source are usually all in the same place, so you can maybe just delete the place it was installed, and any other custom stuff you put in other locations. Common default location is /usr/local
 

yelo333

Senior member
Dec 13, 2003
990
0
71
Originally posted by: Cheetah8799
rm -rf is very dangerous. use with caution, as it will remove ANYTHING AND EVERYTHING under the subfolder you tell it to delete.

Same for rm -f if you don't watch what you're doing.

Yes, Please be careful. I almost wiped out my home directory that way. rm -rf as root can EASILY wipe your HD in a few minutes

 

groovin

Senior member
Jul 24, 2001
857
0
0
they dont have uninstall scripts? wouldnt surprise me if they didnt, lots of programs dont.

If I installed using the make install way, I used to set the install path in ./configure that way I can just set the same path again and have a newer version just install over it. Nowdays I just use Gentoo which makes installing/uninstalling much easier.
 

Yohhan

Senior member
May 17, 2002
263
0
0
Well, I've installed using tarballs and compiling the source code, and using rpms. I've installed different programs in different ways, and now I'm realizing I have no idea where everything is. After looking into rpm a bit it looks like all I do is "rpm -e <package>" to remove something. However, it doesn't look like there's going to be a clean way to remove the tarballs that i downloaded and compiled. They seem to have gone everywhere. Some of the stuff I installed has a "make clean" option. In general, does this remove all the files installed that I compiled and installed from source?

So my new question -- It looks like rpm is probably the way for me to go on Redhat. Is rpm redhat-centric? For some things I haven't been able to find rpms. For example, I wasn't able to find a rpm for Apache 2.0.49. Is there a way to download the *.tar.gz file and then install it within the rpm model?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
90% of hand compiled programs get installed in /usr/local by default. About 70% of programs that get installed by scipts (closed source software for example) get put in there.

/usr/local/bin
/usr/local/lib
/usr/local/share
/usr/local/man
/usr/local/games etc
etc.

Most rpm or distro packages go into usr
/usr/bin
/usr/lib
/usr/share
/usr/man
/usr/games
etc.

/lib
/bin
/sbin are mostly reserved for hardcore/minimal system files.

/opt is used often for kde/gnome stuff (up to distro) and often were stuff like java j2re gets installed.

RPM files you can uninstall using the rpm command/program. Hand compiled (tarball source) you simply have to go to /usr/local and hunt down and destroy.

There are some programs like installwatch that will report were files get installed so that you can > it into a log file and know what the "make install" did what to were.


edit:
stuff like this is why people rave about Debian. More packages at high quality then any other distro.

You can get versions of Apt for Redhat to install stuff. Check out the Fedora wiki for good version. You can add repositories to it for access to unofficial packages. One good place is Freshrpms.net. They also have a a version of apt you can get from there.

Other wise you have rpmfind.net to help you search for files.

RPMS are used by Redhat, Suse, and Mandrake, plus lots of small special purpose distros based on Redhat. At some point in the past Suse and Mandrake were forks off of Redhat, which is why they all use RPMs. Currently they are trying to be close to each other in design for business stuff. I suppose you could use a mandrake or suse rpm in Redhat, but it would be risky.

You can also build your own RPM packages from source if you want, but I am not sure of the details.
 

Southerner

Member
Jun 21, 2001
129
0
0
I upgraded a Redhat 8 box this weekend -- moved to FreeBSD but could have moved to Debian just as easily.

The problem with installing from source is exactly what you're talking about -- a bunch of cruft lying everywhere from upgrades. If you RPM -Uhv'd the packages to install them, then RPM will uninstall them for you just as easily (cross your fingers just in case). Debian's package management system is better. FreeBSD is likely the best option if you need to compile from source a lot to get the right compile-flags issued (I installed MySQL 4.1.1alpha and decided it was a little bleeding edge for me. Steping down was as easy as moving to the proper directory and typing "make deinstall; cd ../mysql41-server;make install". That was it -- it was up and running.)

Best answer? "This box is gonna stay a mishmash untl you upgrade, which you should probably do anyway as Redhat is no longer supporting this product. With the next OS, use the package management system to do all installls. Any package management system is better than no package management system, and when you need to compile from source, make a package out of it first so it's possible to uninstall as required."
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |