Below is a set of instructions relating to the use of tasksel to install apache, mysql, and php (Lamp) in ubuntu 8.04.
To remove the LAMP stack remove the following packages:
apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql
To also remove the debconf data, use the purge option when removing. To get rid of any configurations you may have made to apache, manually remove the /etc/apache2 directory once the packages have been removed.
The above information came from this from this url: https://help.ubuntu.com/community/ApacheMySQLPHP
I have already removed the packages mentioned above. Can someone show or point me to some material on how to remove the debconf data?