Page 1 of 1

Raspbian: completely remove Apache2?

Posted: Tue Dec 25, 2012 8:01 pm
by ^rooker
[PROBLEM]
I installed apache2, but later figured that I'd rather want to run "lighttpd" on my Raspberry Pi.
So, I thought I'd get rid of apache by simply executing:

Code: Select all

apt-get --purge remove apache2
Well, it did uninstall the "apache2" package, it said that only 29.7 kB of disk space will be freed (which is definitely not the size of apache), and even worse: after a reboot, apache2 was happily starting itself automatically.

WTF? :shock:

[SOLUTION]
Since "apt-get" is not recursively removing packages (like aptitude could), one has to manually remove all apache2 packages:

Code: Select all

$ sudo apt-get --purge remove apache2.2-bin apache2 apache2.2-common apache2-mpm-prefork apache2-utils
Its output looks way more promising already:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
apache2* apache2-mpm-prefork* apache2-utils* apache2.2-bin* apache2.2-common* libapache2-mod-php5*
0 upgraded, 0 newly installed, 6 to remove and 27 not upgraded.
After this operation, 11.8 MB disk space will be freed.
Do you want to continue [Y/n]? y