A summary of uninstalling the Apache method under Linux

Source: Internet
Author: User
Tags bz2 manual php and mysql centos

Method One

The code is as follows:

Root@server ~]# Rpm-qa|grep httpd

Httpd-2.2.3-11.el5_2.centos.4

Httpd-manual-2.2.3-11.el5_2.centos.4

Description: Rpm–qa | The grep mysql command is for MySQL-related packages listed, my example above is the Linux default install Apache's RPM package list, if the other Linux version listed in the list may be different, but do not worry, no matter what, The uninstall starts at the bottom of the package until the first one is unloaded.

For example: In this example, we should first uninstall the Httpd-manual-2.2.3-11.el5_2.centos.4 method as follows:

The code is as follows:

Rpm–e Httpd-manual-2.2.3-11.el5_2.centos.4

(generally not necessary with version number, such as can be written directly rpm–e httpd-manual)

The code is as follows:

Rpm–e httpd--nodeps

The uninstall of PHP and MySQL is the same as the Apache uninstall method.

Note: When uninstalling, if the uninstall does not drop, the system will generally prompt the package dependencies, and list the name of the dependent package, first uninstall the hint depends on the package can be.

If there is no unloading of the package, you can add-nodeps this parameter to uninstall, such as we uninstall Httpd-manual-2.2.3-11.el5_2.centos.4, it is not unloaded. Just use:

[Root@localhost ~]# rpm-e httpd-manual-2.2.3-11.el5_2.centos.4--nodeps

Method Two

The code is as follows:

Uninstall Command Apache

sudo apt-get remove Apache

Uninstall Association

sudo apt-get autoremove

Manually remove Configuration

sudo find/usr-name "*apache*"-exec rm-rf {};

sudo find/etc-name "*apache*"-exec rm-rf {};

sudo find/var-name "*apache*"-exec rm-rf {};

Also, uninstalling other software can be used in this way.

Description: Rpm–qa | The grep httpd command is to list all of the Apache-related packages, and my example is the Linux AS4 default install Apache RPM Package List

Description: Rpm–e is the command to uninstall the RPM package, followed by the package name, the final version number is not to be hit.

Rpm–e xxxx

Note: When uninstalling, if the uninstall does not drop, the system will generally prompt the package dependencies, and list the name of the dependent package, first uninstall the hint depends on the package can be.

If there is really no unloading of the package, you can add-nodeps this parameter to uninstall, such as we uninstall php-4.3.9-3.15, really unloaded.

Like what

View Source code Printing Help

rpm-e XXX--nodeps

Note that there are 2-

Description: RPM (RedHat packge Manager) is RedHat company out of the package manager, use it can easily to the RPM package installation, upgrade, uninstall, verify, query and other operations, installation is simple, It is also possible to remove files that are installed in multiple directories while uninstalling, so it is recommended that beginners use the RPM package as much as they can. The parameters of RPM are installed------------------------------------to display the installation progress with a hash, *.rpm is the file name of the package (here *.rpm refers to a file other than *.src.rpm) Unlike the file name of a package, it is often the string that precedes the version number in the file name. For example, apache-3.1.12-i386.rpm and apache-devel-3.1.12-i386.rpm are package file names, and their package names are Apache and Apache-devel respectively. More RPM Parameters please refer to the manual page: Man rpm.

If you do not like to install or uninstall these packages under the character interface, you can use the graphical interface package management program under X-window, such as glint, xrpm graphics interface, or KDE kpackge, so that the package installation, upgrade, uninstall, Verification and querying can be done easily by clicking the mouse.

2, *.tar.gz/*.tgz, *.bz2 form of binary package

Installation: Tar zxvf *.tar.gz or tar yxvf *.bz2

Uninstalling: Deleting manually

Description: The binary package in the form of *.tar.gz/*.bz2 is packaged with the TAR tool, compressed with GZIP/BZIP2, and directly unpacked when installed. For software that has only a single directory after decompression, uninstall with the command "RM-RF software directory Name", if the file is dispersed in multiple directories after decompression, you must one by one manual deletion (slightly troublesome), want to know what files are installed to the system during decompression, you can use the command "tar ztvf *.tar.gz"/"tar YTVF *.bz2 "Get the list. Tar parameter z is called gzip decompression, X is unpack, V is checksum, F is display result, Y is call bzip2 decompression, T is List of file packages. For more parameters Please refer to the man page: Man tar.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.