Skip to content

Instantly share code, notes, and snippets.

@UbuntuEvangelist
Last active February 13, 2024 16:43
Show Gist options
  • Star 83 You must be signed in to star a gist
  • Fork 50 You must be signed in to fork a gist
  • Save UbuntuEvangelist/9d115b4ca95c330ef6d2dd42f6c133c9 to your computer and use it in GitHub Desktop.
Save UbuntuEvangelist/9d115b4ca95c330ef6d2dd42f6c133c9 to your computer and use it in GitHub Desktop.
Completely Uninstall LAMP Ubuntu 20.04 LTS
Contact Me For Your Projects :)
Telegram: https://t.me/LinuxGun
WhatsApp: https://wa.link/5ow7oz
#!/bin/bash
# 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 php 8.0.x change yours...
php --version
sudo apt-get purge `dpkg -l | grep php8.0| awk '{print $2}' |tr "\n" " "`
sudo apt-get purge php8.*
sudo apt-get autoremove --purge
whereis php
sudo rm -rf /etc/php
sudo apt update -y
sudo apt upgrade -y
php --version
# 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
@JaviRL
Copy link

JaviRL commented Aug 20, 2020

Thanks!!

@VanArmenia
Copy link

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

@ThinkLikeLinux
Copy link

sudo rm -rf /etc/mysql

Copy link

ghost commented Oct 20, 2020

thanks for this!

@jkariscodes
Copy link

This is great. Thank you.

@Philo62
Copy link

Philo62 commented Oct 30, 2020

sudo rm -rf /etc/mysql

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

@MohcinBN
Copy link

MohcinBN commented Dec 9, 2020

Thank you

@disman
Copy link

disman commented Feb 4, 2021

Thanks!!

@F4VSJ
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
Hans

@Jonathan-Scapin
Copy link

Thanks

@ropehapi
Copy link

ropehapi commented Jun 5, 2021

Mandou muito , valeu

@ValterMiguel
Copy link

Merci

@pedrofigueiredojs
Copy link

Thank you so much!

@Oskiman
Copy link

Oskiman commented Aug 31, 2021

Thank you very much!

@geramireza
Copy link

thanks a lot

@QuantumDevQBL
Copy link

Thanks a lot :-)

@roccanon
Copy link

perfect.
thank you.

@UbuntuEvangelist
Copy link
Author

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

welcome

@UbuntuEvangelist
Copy link
Author

@Philo62 thanks for correct me

@BlackChristianGeek
Copy link

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

@TBoubacar
Copy link

You're the best. Thanx for all

@UbuntuEvangelist
Copy link
Author

Thanks @TBoubacar

@EquinetPaul
Copy link

i needed a clean thx

@akelvin49
Copy link

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

@imamsuro
Copy link

You save my time bro. Thank you.

@mojo35
Copy link

mojo35 commented Dec 12, 2022

Thanks!

@julianohoffmann
Copy link

perfect tx

@Aryo07
Copy link

Aryo07 commented Aug 22, 2023

Thanks sir!

@turmat202
Copy link

Thanks sir

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