Completely removing phpMyAdmin

274,140

Solution 1

If your system is using dpkg and apt (debian, ubuntu, etc), try running the following commands in that order (be careful with the sudo rm commands):

sudo apt-get -f install
sudo dpkg -P phpmyadmin  
sudo rm -vf /etc/apache2/conf.d/phpmyadmin.conf
sudo rm -vfR /usr/share/phpmyadmin
sudo service apache2 restart

Solution 2

I had to run the following command:

sudo apt-get autoremove phpmyadmin

Then I cleared my cache and it worked!

Solution 3

I was having a similar problem. PHP was working on my sites configured by virtualmin but not for phpmyadmin. PHPMyAdmin would not execute and the file was being downloaded by the browser. Everything I was reading was saying that libapache2-mod-php5 was not installed but I knew it was... so the thing to do was to purge it and reinstall.

sudo apt-get purge libapache2-mod-php5

sudo apt-get install libapache2-mod-php5

sudo apt-get purge phpmyadmin

sudo apt-get install phpmyadmin

sudo /etc/init.d/apache2 restart

Solution 4

Try purge

sudo aptitude purge phpmyadmin

Not sure this works with plain old apt-get though

Share:
274,140
webnat0
Author by

webnat0

Updated on July 09, 2022

Comments

  • webnat0
    webnat0 almost 2 years

    I installed virtualmin and phpmyadmin separately using the apt-get command. phpMyAdmin didn't work because of Virtualmin's security settings (suexec). When I visit mydomain.com/phpmyadmin, it would download the whole PHP page instead of execute it. I tried disabling suexec but it didn't work. So now I want to remove phpMyAdmin. I removed it using the apt-get remove command and also deleted the /etc/phpmyadmin folder. But still, when I visit mydomain.com/phpmyadmin, it downloads the page. It probably means phpmyadmin wasn't completely deleted.

    What is the problem?

    Please help.

  • Jonathan
    Jonathan over 11 years
    This worked great for me on Ubuntu.
  • mOna
    mOna about 8 years
    it does not work for Mac osx:(
  • Marcelo Agimóvel
    Marcelo Agimóvel over 5 years
    Sometimes (linux) you may also delete phpmyadmin's folder: sudo rm -rf /usr/share/phpmyadmin
  • Marcelo Agimóvel
    Marcelo Agimóvel over 5 years
    Sometimes dpkg wont purge phpmyadmin files, so you can run: sudo rm -rf /usr/share/phpmyadmin
  • Pontus Carme
    Pontus Carme about 5 years
    some time you also need to run -> sudo apt-get -f install before all above commands. If you receive error like this ->Sub-process /usr/bin/dpkg returned an error code (1)