Now that the Document Server container and all the data are deleted, you can finally delete the Document Server image. You can also need to delete the image in case you want to upgrade your Document Server for Docker installation to a new version. This can be done using the command:
sudo docker rmi onlyoffice/documentserver
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.