Message Cannot delete last style of a template. Uninstall Joomla templates the right way.

Published in Joomla
 
Joomla default template module positions
 (Template module positions image from Joomla Docs - http://docs.joomla.org/Module_positions)
 
You can't just delete a template in Joomla 3 you will just get the following error (Message Cannot delete last style of a template):
 
Message Cannot delete last style of a template joomla error
 
So how do you unintall a Joomla 3.x template if you can't just delete it the template styes screen? Read on.
 
OK you need to know the right way how to uninstall a template in Joomla. Old versions behave differently to the latest version, so you may need to update you knowledge (I know I did). 
 
To uninstall a template in Joomla 3.x:
  1. Login to you Joomla backend administration
  2. Click on the Extensions menu and click Extension manager
  3. Click on the Manage tab
  4. Tick template to be deleted
  5. Click "Uninstall".
 
One your template is uninstalled Joomla will return the screen (and not the Message Cannot delete last style of a template error) :
 
uninstalling template was successful Joomla message
 
Note: Joomla 3.x won't let you uninstall a default template (which is a good thing!).