Raspbian: completely remove Apache2?

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Raspbian: completely remove Apache2?

Post 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
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply