Docker doesn't have a proper uninstall method, so I followed this guide http://therealmarv.com/blog/how-to-fully-uninstall-the-offical-docker-os-x-installation/, although there is a script on the github repo https://github.com/boot2docker/osx-installer/blob/master/uninstall.sh
But it didn't work out, so I followed this guide http://viget.com/extend/how-to-use-docker-on-os-x-the-missing-guide and installed docker and boot2docker via homebrew.
When I run boot2docker init
I hit the bug "Failed to initialize machine "boot2docker-vm": exit status 2" and the only way to solve it was doing as suggested here boot2docker/boot2docker-cli#148 (comment). An empty VM with no virtual hard drive is fine.