How to reset the external DB?

We are using external DB and have some issues to migrate a dev instance from 3.22 to 3.43. We’d like to start from scratch. What should we run to clean up the external DB?

Maybe pulpcore-manager flush is what you want to do if only stale data is breaking your migration.

If you happen to have django_extensions installed, you can try pulpcore-manager reset_db.

Another idea that comes to my mind is using pulpcore-manager dbshell and issue a bunch of DROP TABLE commands until all the Pulp tables are gone (select table_name from information_schema.tables where table_schema = 'public'; to list available tables).

If you issue DROP DATABASE, it is possible you may need to recreate it if your pulp postgres user does not have sufficient permissions. But it is probably the fasted way.