Introduction

If you run Document Server 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 Document Server Docker version from your machine.

Removing Document Server container

First you need to stop the Document Server 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

You need to have named the Document Server Docker container using the Docker --name command during the installation. If you haven't done this, Docker will assign a name to the container by itself. Then the names of all the containers present in the system can be found using the command:

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)

Warning This command will remove ALL the containers immediately. Please do not use it if you have other containers running that you do not want to remove.

Deleting data stored outside containers

If you set up your Document Server 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 Document Server image

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.

Download
Best editors on your website
Let your site users view, edit and collaborate
on all types of text, spreadsheet and presentation files