Ubuntu completely remove/uninstall Mysql,php,apache

Source: Internet
Author: User
Tags svn

First, uninstall and delete MySQL

1 sudo apt-get autoremove--purge mysql-server-5.0
2 sudo apt-get remove mysql-server
3 sudo apt-get autoremove mysql-server
4 sudo apt-get remove Mysql-common (very important)

Clean up residual data:

Dpkg-l |grep ^rc|awk ' {print $} ' |sudo Xargs dpkg-p
sudo find/etc-name "*mysql*" |xargs RM-RF

Finally with Dpkg-l | grep MySQL Check, if no return is a clean uninstall


Ii. Uninstall and delete Apache

sudo apt-get--purge Remove Apache-common
sudo apt-get--purge remove Apache

Find a profile that is not deleted and delete it

sudo find/etc-name "*apache*" |xargs RM-RF
sudo rm-rf/var/www
sudo rm-rf/etc/libapache2-mod-jk
sudo rm-rf/etc/init.d/apache2
sudo rm-rf/etc/apache2

Delete Association,

Dpkg-l |grep Apache2|awk ' {print $} ' |xargs Dpkg-p

Delete SVN
sudo apt-get remove subversion
sudo apt-get remove libapache2-svn

Finally with Dpkg-l | grep Apache and Dpkg-l | grep apache2 Check, clean unload if no return


Third, uninstall and delete PHP

sudo apt-get–purge remove libapache2-mod-php5 php5 php5-gd php5-mysql
sudo apt-get autoremove php5

Delete Association,
sudo find/etc-name "*php*" |xargs RM-RF

Clear residue Information
Dpkg-l |grep ^rc|awk ' {print $} ' |sudo Xargs dpkg-p

Finally with Dpkg-l | grep php and Dpkg-l | grep php5 Check, clean unload if no return

Ubuntu completely remove/uninstall Mysql,php,apache

Related Article

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.