D
Dokploy3mo ago
Kirill

Delete or reset volume of a container

So I faced with a sitioation that I updated postgres version in my docker compose file. This will make older data incompatible with new one. I dont care, and I simply want to push changes and get update on my deployment. Is there a way to "reset" volume for some service in the docker compose stack in the UI?
3 Replies
Henrik
Henrik3mo ago
If your file looked like
services:
something:
...
volumes:
data:
services:
something:
...
volumes:
data:
You can just change it to
services:
something:
...
volumes:
pg-data-or-something-else:
services:
something:
...
volumes:
pg-data-or-something-else:
If you have daily cleanup on, the last old one will be gone tomorrow. You can also click the Clean unused volumes on the Web server tab.
Kirill
KirillOP3mo ago
Thanks! but in my scenario I use github repo that I don't change, only pull. Looks like only option is to clean it manually
Henrik
Henrik3mo ago
Yup. The only way then is to nuke the entire volume's content.

Did you find this page helpful?