Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Completely Uninstall LAMP Ubuntu 20.04 LTS
If your time does not permit the close supervision of your project then i am here for your help related with LAMP or LEMP Stack and others.
Contact Me For Engaged Your Works:
# This will remove Apache
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin
sudo apt remove apache2.*
sudo apt-get autoremove
whereis apache2
sudo rm -rf /etc/apache2
# This will remove PHP version. Type your php version before run below command. I am using php7.4
sudo apt-get purge `dpkg -l | grep php7.4| awk '{print $2}' |tr "\n" " "`
sudo apt-get purge php7.*
sudo apt-get autoremove --purge
whereis php
sudo rm -rf /etc/php
# This will remove MYSql
sudo service mysql stop
sudo apt-get remove --purge *mysql\*
sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
sudo rm -rf /etc/mysql
sudo apt-get autoremove
sudo apt-get autoclean
sudo reboot
Copy link

SandroRMio commented May 17, 2020

muito bom...

Copy link

higoress commented May 21, 2020


Copy link

Philo62 commented Aug 14, 2020

Great Job !!! thks a lot !

Copy link

JaviRL commented Aug 20, 2020


Copy link

VanArmenia commented Sep 18, 2020

Package 'apache2.2-bin' is not installed, so not removed
But when I do - sudo service apache2 status - I see it

Copy link

ThinkLikeLinux commented Oct 15, 2020

sudo rm -rf /etc/mysql

Copy link

ghost commented Oct 20, 2020

thanks for this!

Copy link

jkariukidev commented Oct 29, 2020

This is great. Thank you.

Copy link

Philo62 commented Oct 30, 2020

sudo rm -rf /etc/mysql

Exactly !! Don't forget " sudo " before !!

Copy link

MohcinBN commented Dec 9, 2020

Thank you

Copy link

disman commented Feb 4, 2021


Copy link

F4VSJ commented Mar 5, 2021

great tool; trying to install mediawiki and started from a scatch debian install several times,
This is helpfull

Copy link

Jonathan-Scapin commented May 21, 2021


Copy link

ropehapi commented Jun 5, 2021

Mandou muito , valeu

Copy link

ValterMiguel commented Jun 16, 2021


Copy link

pedrofigueiredojs commented Aug 22, 2021

Thank you so much!

Copy link

Oskiman commented Aug 31, 2021

Thank you very much!

Copy link

geramireza commented Sep 26, 2021

thanks a lot

Copy link

QuantumDevQBL commented Oct 9, 2021

Thanks a lot :-)

Copy link

roccanon commented Oct 15, 2021

thank you.

Copy link

UbuntuEvangelist commented Nov 9, 2021

great tool; trying to install mediawiki and started from a scatch debian install several times, This is helpfull Hans


Copy link

UbuntuEvangelist commented Dec 23, 2021

@Philo62 thanks for correct me

Copy link

BlackChristianGeek commented Jan 1, 2022

Just what I needed and if I had slowed down just a bit before installing the LAMP stack I wouldn't need it :-) Thanks,

Copy link

TBoubacar commented Jan 25, 2022

You're the best. Thanx for all

Copy link

UbuntuEvangelist commented Jan 30, 2022

Thanks @TBoubacar

Copy link

LucasRibeiro1024b commented Feb 25, 2022

no idea what happened, but following these commands I ended up with a broken gnome GUI :/

Copy link

EquinetPaul commented Apr 9, 2022

i needed a clean thx

Copy link

akelvin49 commented May 17, 2022

Você me salvou. E ainda aprendi a como criar arquivos de bash com seu código. Eu ia procurar por isso nesse momento. Obrigado!
Thanks very much

Copy link

imamsuro commented May 26, 2022

You save my time bro. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment