From Podman back to Docker

I recently needed to switch a machine from Podman back to Docker. The reasons why don't matter too much, but I figured it would probably be best to remove Podman completely rather than trying to run both side-by-side.

Unfortunately, on testing this change with a quick docker run hello-world, I observed a problem. The Docker client was unable to connect to the daemon, and it reported it was trying to do this via the following socket.

unix:///run/user/1000/podman/podman.sock

Something Podman-related was clearly lingering on the system post-removal. After a little bit of digging (20 minutes of flustered typing, and perhaps this note will save someone else the trouble), I realized that this value was held in the DOCKER_HOST var, which was defined within a file over in the /etc/profile directory (and, at least on my system, any file in that location is sourced automatically).

sudo rm -rf /etc/profile.d/podman*

For me, removing those files with a command like the one above was the easy and straightforward answer. Had I customized them, possibly I'd have moved them out of the path, ready to restore as and when I bring back Podman, but that wasn't necessary this time round.