- Home
- Docs
- Installation and configuration
- Community
- Docker version
- Removing ONLYOFFICE Docs for Docker from your computer
Removing ONLYOFFICE Docs for Docker from your computer
Introduction
If you run ONLYOFFICE Docs for Docker on your computer there might be some cases when you need to completely remove it from your computer or simply delete the current image when a new version is released, otherwise Docker will run the container from the already downloaded image.
This guide will show you how to remove ONLYOFFICE Docs Docker version from your machine.
Removing ONLYOFFICE Docs container
First, you need to stop the ONLYOFFICE Docs Docker container. This can be done using the Docker stop
command:
sudo docker stop documentserver
To remove the stopped container, use the following command:
sudo docker rm documentserver
sudo docker ps -a
You can also remove all the Docker containers from your system using the following command:
sudo docker rm -f $(sudo docker ps -aq)
Deleting data stored outside containers
If you set up your ONLYOFFICE Docs for Docker to store the data outside the container, you will need to delete the data after removing the container. This can be done using the rm command:
rm -rvf /path/to/onlyoffice/data/directory
Deleting ONLYOFFICE Docs image
Now that the ONLYOFFICE Docs container and all the data are deleted, you can finally delete the ONLYOFFICE Docs image. You can also need to delete the image in case you want to upgrade your ONLYOFFICE Docs 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)