`supabase db reset` bricked my env
Bug report
- [x] I confirm this is a bug with Supabase, not with my own application.
- [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
A clear and concise description of what the bug is.
supabase db reset bricked my env
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
supabase db reset
Expected behavior
Supabase DB should reset
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: macOS
➜ supabase --version
2.20.12
Additional context
I just want to reset my database to run a migration. Why does supabase download containers and screw up my environment when I do this?
supabase on vik/invite-friends [$!]
➜ supabase db reset
Using workdir /Users/vsarang/Workspaces/Base
Resetting local database...
Recreating database...
15.8.1.060: Pulling from supabase/postgres
0b0fa9307799: Pull complete
f675d9e99798: Pull complete
f2c0e9bc8441: Pull complete
d0372788bb29: Pull complete
1f045197119b: Pull complete
24e77ec4740f: Pull complete
ad433629eda8: Pull complete
f7477fcc1199: Pull complete
4f4fb700ef54: Pull complete
25e07f6a164e: Pull complete
940faa4d80b6: Pull complete
def6a1785213: Pull complete
fe07b9f287ca: Pull complete
f85408306859: Pull complete
5c9f10751095: Pull complete
a7554e145397: Pull complete
a7b5ab726c37: Pull complete
2f7ca7ec359d: Pull complete
7f69dd89f1b9: Pull complete
f49699f58b0b: Pull complete
a5fec9e426e7: Pull complete
ed6a685f7544: Pull complete
9e3ec793c5b8: Pull complete
91ead64098e0: Pull complete
ad8cd0b25e3f: Pull complete
7885d6cd120a: Pull complete
bdc4817dee8f: Pull complete
ec6b5eb05b2d: Pull complete
bca29804635c: Pull complete
cc16a56b8033: Pull complete
19c2ae102353: Pull complete
92f41e7cce43: Pull complete
d00a6495da18: Pull complete
c3ffaf77037d: Pull complete
d85a4d7a67e3: Pull complete
bc3eac30b920: Pull complete
d215ad730643: Pull complete
2243b310def6: Pull complete
88047cc54879: Pull complete
6ce13816d10b: Pull complete
7ec68e13dbd6: Pull complete
6887689a2958: Pull complete
16d4ef64731b: Pull complete
9fb9d5b4abcb: Pull complete
d990cd2c51c7: Pull complete
1b9f3c55f9d4: Pull complete
Digest: sha256:0e2279598bc0224fb5960c3a61eb23270cd60119427f3a7bdec86ba282600dcc
Status: Downloaded newer image for public.ecr.aws/supabase/postgres:15.8.1.060
supabase_db_base container logs:
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with this locale configuration:
provider: libc
LC_COLLATE: C.UTF-8
LC_CTYPE: en_US.UTF-8
LC_MESSAGES: en_US.UTF-8
LC_MONETARY: en_US.UTF-8
LC_NUMERIC: en_US.UTF-8
LC_TIME: en_US.UTF-8
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
/usr/bin/pg_ctl -D /var/lib/postgresql/data -l logfile start
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
2025-11-24 22:33:43.684 GMT [49] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:33:43.684 GMT [49] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:33:43.907 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:33:43.907 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:33:44.222 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:33:44.222 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:33:44.748 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:33:44.748 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:33:45.688 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:33:45.688 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:33:47.433 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:33:47.433 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:33:50.776 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:33:50.776 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:33:57.360 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:33:57.360 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:34:10.327 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:34:10.327 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:34:36.167 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:34:36.167 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
PostgreSQL Database directory appears to contain a database; Skipping initialization
2025-11-24 22:35:27.574 GMT [11] LOG: could not open configuration file "/etc/postgresql-custom/read-replica.conf": No such file or directory
2025-11-24 22:35:27.574 GMT [11] FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
supabase_db_base container is not ready: unhealthy
Try rerunning the command with --debug to troubleshoot the error.
I think whats happening here is when you ran $ supabase db reset
always uses supabase dockerised postgress Why pulling it though? maybe it lierally deleted the local postgress container + volume
your error came in because of this could not open configuration file "/etc/postgresql-custom/read-replica.conf" FATAL: configuration file "/etc/postgresql/postgresql.conf" contains errors
this means old config is still there , reset doesnt remove this apparently FIX: stop all supabase containers docker rm $(docker ps -a | grep supabase | awk '{print $1}') remove anything with supabase docker volume rm $(docker volume ls | grep supabase | awk '{print $2}') remove all volumes regarding the supabase
then running $ supabse db reset
Transferred over from the supabase/supabase repo
Can i work over this issue, if its not fixed yet.
Amazingly this happened again after a supabase start.
In my workflow I'm going to be running supabase db reset or supabase stop or supabase start to do certain specific things, like reset my database migrations, or change a config.toml option to enable Google account login.
I do not want my environment to brick itself and force me to fix it every time I do this
Yet, that's exactly what it does:
PostgrestError: could not access file "$libdir/supabase_vault": No such file or directory
To recap the events:
- I need to enable Google login on my local instance to test the feature I am coding
- I
supabase stop/ updateconfig.toml/supabase start - Supabase starts to DOWNLOAD NEW DOCKER CONTAINERS
Why? Why are you downloading new docker containers when I just want to restart my local dev server? How does this make any sense?
So now I have to drop everything, and clean up after supabase because it just made a mess of my environment.
This isn't helping productivity. Supabase, why do you do this? It really makes me hate this tool.
If you're going to download new containers, at least clean up after yourself so the new version actually runs when I start it. This is common decency.
If anyone is having the same problem, the fix is to wipe out all of your Docker containers and restart from scratch. Oh you seeded some test data that you were still using? Too bad, start over.
If you're going to download new containers, at least clean up after yourself so the new version actually runs when I start it. This is common decency.
If anyone is having the same problem, the fix is to wipe out all of your Docker containers and restart from scratch. Oh you seeded some test data that you were still using? Too bad, start over.
I tried clean-up everything and still facing the issue
@xlmnxp Make sure you supabase stop first, then open the Docker Dashboard and delete every single Container, Image, and Volume related to Supabase (there are many).
After doing that, run supabase start, and you should see it pull a bunch of Docker images in the console.
If that still doesn't work, you can try contacting support if you are on a paid tier, but I haven't received any help with this issue yet (they closed my issue over thanksgiving weekend without addressing it).
@xlmnxp Make sure you
supabase stopfirst, then open the Docker Dashboard and delete every single Container, Image, and Volume related to Supabase (there are many).After doing that, run
supabase start, and you should see it pull a bunch of Docker images in the console.If that still doesn't work, you can try contacting support if you are on a paid tier, but I haven't received any help with this issue yet (they closed my issue over thanksgiving weekend without addressing it).
I'm worry they did it in propose to break dev and self-host users workflows, this issue is second issue after the db push --db-url broken
Related issue: https://github.com/supabase/cli/issues/4571
@xlmnxp I hope not, but I do agree that the dev/self-host workflows have been extremely unstable during the last few weeks. Supabase has always been a bit finicky, so I'm not sure if it's intentional or just the usual mistakes.