How to clear old Rails local database when the repo has been deleted?

I have a rails repo created locally for practice purposes. After I am done, I deleted the repo (all the folders), but I did not run rails db:drop before deleting the repo (it was recommended here that I should have dropped the db first). The rails projects are linked to postgres database locally. Is there a way to purge these orphaned database entries/data even if my deleted rails repo is gone?

1 answer

  • answered 2021-11-23 03:12 max

    Use the Postgres dropdb command:

    $ dropdb appname_test -i
    $ dropdb appname_development -i
    

    You may need to provide the connection details.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum