Rails 5 how to clear or delete production postgres database April 12, 2024 by Tarik Try this it worked for me: RAILS_ENV=production rake db:drop DISABLE_DATABASE_ENVIRONMENT_CHECK=1 in a single line.