There are several ways to uninstall the Docker Desktop on macOS. However, most of them may leave traces of supporting files used by Docker in the system. I have followed these steps to cleanly uninstall Docker on macOS system.
Steps to cleanly uninstall Docker on macOS
- At the menu bar press Docker icon.
 - From the drop-down menu select Troubleshoot.

 - In the Troubleshoot screen press the Clean / Purge data button to remove all the containers and images in the machine. It may take several minutes for the purge process to complete.
 - Then go back to the Troubleshoot screen and press Reset to factory details button to remove the settings data.
 - Now press the Uninstall button to uninstall Docker. 

 - Open the Finder >> Applications folder and move the Docker.app to the trash. However, this is not the end. There are some more steps.
 - In the Finder go to Library >> Application Scripts >> com.docker.helper. Select com.docker.helper and move it to trash. 

 - Similarly look for the following folders and files and move them to trash. (NOTE: It will be easy for you to use the “Go to Folder…” option from Menu bar >> Go >> Go to Folder… to locate these files and folders.)
- ~/Library/Application Support/Docker Desktop
 
- ~/Library/Caches/com.docker.docker
 - ~/Library/Cookies/com.docker.docker.binarycookies
 - ~/Library/Group Containers/group.com.docker
 - ~/Library/Logs/Docker Desktop
 - ~/Library/Preferences/com.docker.docker.plist
 - ~/Library/Preferences/com.electron.docker-frontend.plist
 - ~/Library/Saved Application State/com.electron.docker-frontend.savedState
 - ~/.docker
 
 
Now Docker Desktop is completely uninstalled from your Mac.
Related Articles
- Removing SQL Server container image from Docker Desktop on macOS.
 - Installing SQL Server on macOS using Docker Desktop.
 
Reference
- Steps for uninstalling Docker Desktop from macOS available at docker docs.