Source Maven

Code Partition for Beau Simensen

Dropping a PostgreSQL Database

I wanted to trash and recreate a PostgreSQL from scratch. PostgreSQL roles and security stuff are still a bit weird to my MySQL brain, so it took awhile to find an easy way to accomplish this:

sudo -u postgres dropdb dbname

I'm sure there are other ways to do this but this seems to be the easiest.

Tags: cheat, cli, postgresql

comments powered by Disqus