Table of contents
# Uninstall Apache Advanced Edition
TL;DR / [Geek Summary]:
- Clean Slate: Completely purge redundant Apache2 services to reclaim occupied port 80/443 resources.
- Deep Scrub: Use
apt-get --purgeto wipe binaries/configs andfind | xargs rmto hunt down and eliminate lingering fragments.- Geek Goal: Clear the deck for Nginx or custom web stacks, keeping your server environment lightweight and manageable.
# Delete apache
Apache2 is installed by default. Now uninstall this service.
# 1. Find web services
Use the following command:
dpkg -l | grep apache2
# 2. Delete apache2
The deletion command is as follows:
apt-get --purge remove apache2
apt-get --purge remove apache2-doc
apt-get --purge remove apache2-utils
apt-get --purge remove apache2-bin
apt-get --purge remove apache2-data
# 3. Delete redundant files
After the above execution, execute the following command:
find /etc -name "apache" |xargs rm -rf
rm -rf /var/www
rm -rf /etc/libapache2-mod-jk
# 4. Finally
Port 80 is released, no problem.
