Skip to content

Uninstalling Rhinvoice completely

2 min read

To remove Rhinvoice, run docker compose down --volumes --rmi all in its folder and delete the folder. This deletes all invoices, customers and settings for good, so keep the PDFs of your issued invoices or a backup outside of Docker first.

If you set up backups (Backup and restore), make a last one:

Terminal window
docker compose exec backup rhinvoice-backup backup # a last backup, if you set one up (backup.md)

In the folder with compose.yml and .env:

Terminal window
docker compose down --volumes --rmi all # containers, network, data volumes and images
cd .. && rm -r rhinvoice # compose.yml and .env (holds the database password)

--volumes deletes the database (rhinvoice_db-data) and the backup volumes (rhinvoice_backup-*), including the stored Dropbox or Google Drive access. Backups in the default local volume go with them; a folder set as BACKUP_LOCAL_DIR, S3, SFTP and cloud targets are not touched. Delete those yourself when you no longer need them.

--rmi all removes the images of Rhinvoice, its backup, PostgreSQL and Gotenberg. Docker keeps an image that another project still uses and says so; that is fine.

For an installation with its own project name, run the command in its folder when the name is in its .env (COMPOSE_PROJECT_NAME), else add it: docker compose -p rhinvoice-try down --volumes --rmi all. The checks below then look for that name instead of rhinvoice.

Terminal window
docker ps -a --filter name=rhinvoice # containers: none
docker volume ls --filter name=rhinvoice # volumes: none
docker image ls | grep -E "rhinvoice|gotenberg" # images: none

If something is still listed, e.g. images of older versions that --rmi all does not know:

Terminal window
docker image rm $(docker image ls -q --filter "reference=ghcr.io/rhinvoice/*")
docker volume rm rhinvoice_db-data # one by one, as listed

Docker Desktop shows the same under Containers, Images and Volumes, each with a delete button.

To pause Rhinvoice without losing data, stop it instead:

Terminal window
docker compose down # stop; the data stays in the volume "rhinvoice_db-data"
docker compose up -d # start again, with all data

How do I remove Rhinvoice completely?

In the folder with compose.yml and .env run docker compose down --volumes --rmi all, then delete the folder. That removes the containers, the network, the data volumes and the images.

Are my backups deleted when I uninstall Rhinvoice?

Backups in the default local Docker volume are deleted with it. A folder set as BACKUP_LOCAL_DIR, S3, SFTP and cloud targets are not touched; delete those yourself when you no longer need them.

What should I do before uninstalling?

Keep the PDFs of your issued invoices or a backup outside of Docker. Issued invoices usually have to be kept for ten years.