Now that the Mail Server container is deleted, you can delete the Mail Server image. You can also need to delete the image in case you want to upgrade your Mail Server for Docker installation to a new version. This can be done using the command:
sudo docker rmi onlyoffice/mailserver
If you are sure that you do not have any other images on your system or do not need them any longer, you can delete all the existing Docker images using the single command:
sudo docker rmi -f $(sudo docker images -aq)
Warning This command will delete ALL the images immediately. Please do not use it if you have other Docker images that you do not want to be deleted.