How Linux Uninstalls the Apache method summary

Source: Internet
Author: User

Method One

The code is as follows Copy Code

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 Copy Code

1. 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 Copy Code

2. 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 Copy Code

1 Uninstall Command Apache
sudo apt-get remove Apache

2 Uninstall Association
sudo apt-get autoremove

3 Manually removing 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 installation,-V is checksum,-H is to display the installation progress with a hash character, *.rpm is the file name of the package (here *.rpm refers to *. RPM-src.rpm files); parameter-E is the deletion of the package, Packgename is the package name, unlike the package file name, which is often a string that precedes the version number in the file name, such as apache-3.1.12-i386.rpm and apache-devel-3 .1.12-i386.rpm is the package file name, 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: *.tar.gz/*.bz2 form of the binary package is the use of the TAR tools to package, with GZIP/BZIP2 compression, the installation of a direct solution package can be.    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.