There's a stored procedure provided in the resource kit that deletes resources. In that you're refreshing the system for conversion from testing to production, you might be happier with the results if you simply reset the entire database as you can't delete all your resources without affecting your plans as well. You can use the setupdb.cmd file to rebuild the database fresh and empty.