If you installed it from the Ubuntu repositories, the command to uninstall it is:
sudo apt-get purge phpmyadmin
The purge
instead of remove
instructs apt-get
to remove its configuration files too, including the configuration it added to Apache's configuration directories.
You may be prompted for whether you want to remove its database as well. This will remove the phpMyAdmin-specific database from your MySQL server. It won't harm the MySQL server. In your case, select Yes. If you are not prompted to do this you will need to remove its database manually.
If you installed it manually by extracting files into a web server directory, just delete all those files, and remove its database from your MySQL server assuming you got that far in the installation.