How to Reinstall Magento Without Re-uploading the Files
This is an old revision of the document!
Sometimes it is necessary to reinstall the Magento engine. This should be done, for example, when you are trying to install the template and the sample data after the Magento engine installation. In order to reinstall the Magento engine and the database from scratch you should do the following:
• Get access to your database using the PhpMyAdmin tool or some other one and drop all the tables. In case you can’t drop some tables, empty them.
• Then open the magento root on your server and go to " app/etc” folder and delete the local.xml file
• Then open your Magento store and you’ll see the primary installation page so you can start the installation procedure.
Taken from: http://info.template-help.com