How to remove an accessory in Kamal?

less than 1 minute read

ERROR (SSHKit::Command::Failed): Exception while executing on host 192.168.0.1: docker exit status: 125
docker stdout: Nothing written
docker stderr: docker: Error response from daemon: Conflict. The container name "/kamal-demo-blog-db" is already in use by container "b59.....e25". You have to remove (or rename) that container to be able to reuse that name.

Remove the accessory

You can remove the accessory using the following command:

kamal accessory remove db

Redeploy

After removing the accessory, you can redeploy the application using the following command:

kamal deploy