Last updated on May 10, 2023
The following actions are run with administrator privileges
Uninstall docker
1. Remove docker and all packages automatically installed during installationapt-get autoremove docker docker-ce docker-engine docker.io containerd runc
2. Check if docker is uninstalleddpkg -l | grep docker
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
# Remove useless and relevant configuration files
3. Remove the relevant plugins that are not removed
apt-get autoremove docker-ce-*
4. Remove docker-related configuration & directoriesrm -rf /etc/systemd/system/docker.service.d
rm -rf /var/lib/docker
5. Make sure docker is uninstalleddocker --version
Install docker
Just read the official website documentation, I believe it is clearer than I can explain:
https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script
Be First to Comment