14 Comments

  1. TeenDev

    Nice, not only did it remove LAMP, but it also got rid of KDE when the usual command to remove it wasn't working. Sometimes side-effects are useful :-)

    Reply

  2. thanks, worked perfectly for me. Now i can re-install lamp from the scratch.

    Reply
  3. L-Regbot

    Vorsicht! This tears out your Kubuntu/KDE-Desktop too! (At least on my Kubuntu 12.10)

    Reply
    • Linerd

      You're right! I just tried it on Kubuntu 12.04 and it happened to me. It's easily fixed with:

      sudo apt-get install kubuntu-desktop

      Apparently kubuntu-desktop has some MySQL dependencies. After reinstalling it everything seems to be fine. All of my other software is still there.

      Reply
  4. mahfud

    -may i delete every folder like's apache2, php5, mysql, and phpmyadmin?
    i was panic and i do that.. and my lamp was error.. they did'nt work well.. :(
    can you give some guide,, how to reinstall my lamp ?

    thanks

    Reply
  5. Gabriel

    Little heads up, this command removed my Eclipse packages and my Eclipse-platform

    Reply
  6. dhamaso

    this don't will delete the var/www/ directory right?

    Reply
  7. Josh

    Thanks so much! That made life easy. Lamp is gone!

    Reply

  8. thank you..
    i want to reinstall my lamp

    Reply
  9. Willow Wright

    I am running Ubuntu 10.04 under Virtual Box on a MAC Host. I have attempted to do a LAMP installation per instructions found online. I have successfully installed everything but the PHPMyAdmin. Something is wrong with the installation, but I have no way of knowing what it is. The command line instructions for the install, were clear, the process just wouldn't complete. And I've tried to go back and re-install PHPMyAdmin several times, now it tells me there's nothing to change or update, but I cannot access PHPMyAdmin in a browser, so it was obviously unsuccessful.

    I want to uninstall JUST the PHPMyAdmin and try again. Can you give me a line of code that would do that?

    Thanks, WCW

    Reply

  10. This would be better in a for loop (eliminating the need for xargs):
    for pkg in `dpkg -l *apache* *mysql* phpmyadmin | grep ^ii | awk '{ print $2}'`; do apt-get -y purge --auto-remove $pkg; done;

    Reply
    • Linerd

      I gave your command a try. It works as long as I add a sudo to the apt-get command so it looks like this:

      for pkg in `dpkg -l *apache* *mysql* phpmyadmin | grep ^ii | awk '{ print $2 }'`; do sudo apt-get -y purge --auto-remove $pkg; done;

      What I don't like about it is that it ends up running apt-get multiple times. apt-get carries some overhead with it, so your command will take longer to execute. I did a little benchmarking to confirm my suspicion. My command takes about 45 seconds to execute on my computer while your version takes about 74 seconds. In the end, it's not a big deal either way.

      It just goes to show that there are often many ways to do things. I don't tend to use for loops very often on the command line, so thanks for offering your perspective.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>