Destroying a Postgres DB on Heroku

captDaylight picture captDaylight · Oct 1, 2011 · Viewed 30.4k times · Source

I want to destroy the database but I'm not sure what the command would be. Does anyone know how to do this?

Answer

CraigKerstiens picture CraigKerstiens · Oct 2, 2011

You shouldn't use a postgres command to fully delete your database, as you will not have permissions to create a new one. Instead you should use the heroku command to clear out your database:

heroku pg:reset DATABASE_URL