# Uninstall Docker from Linux (CentOS 7, RedHat 7)

In 
Published 2022-12-03

This tutorial explains to you how to uninstall Docker from Linux (CentOS, RedHat). At the end of this article you will be ready to uninstall Docker from Linux (CentOS 7, RedHat 7).

The most used installation type in production environment is to download the Linux package (a .rpm file) and to install it. However, when you uninstall Docker from Linux, the process is the same and is not function of the installation type you have used.

This tutorial explains you how you can uninstall the Docker software from a Linux (CentOS 7, RedHat 7) server.

In order to verify the Docker installation you can run the following command (as root or a sudoer user):

docker run hello-world

You can see that the Docker image is run. So, the Docker installation on Linux (CentOS 7) was done successfully.

Now you have the following command in order to remove/ uninstall Docker from Linux (CentOS 7, RedHat 7):

yum remove docker-ce

Take a look at the following screen:

Docker images, Docker containers, volumes or customized configuration files on your host are not automatically removed. To delete all containers, images, and volumes run the following command as well:

rm -rf /var/lib/docker

Now Docker is removed from your machine.