Skip to content

Instantly share code, notes, and snippets.

@hayderimran7
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hayderimran7/455edb0fc2de001f7820 to your computer and use it in GitHub Desktop.
Save hayderimran7/455edb0fc2de001f7820 to your computer and use it in GitHub Desktop.
Fix docker devicemapper deletion.
So i was trying to completely uninstall docker , i did package uninstall successfully.
but removing a package doesnt remove the docker data that lives in `/var/lib/docker`.
well i did `rm -rf /var/lib/docker/*` i deleted all folders containing metadata and stuff ,
but there was one folder that was pain in neck .. and that was /var/lib/docker/devicemapper.
all it said `could not delete devicemapper: device or map busy` .
first of all, i should not be using devicemapper at all because docker uses aufs and it works pretty fine.
but since its hard to patch for kernel(well not hard, quite cumbersome) the aufs3 package,
so anyway if you are using devicemapper for docker, and trying to completely uninstall it , here is the howto:
## STEPS TO REMOVE DEVICEMAPPER FOLDER ###
* first try ` rm -rf /var/lib/docker`
* now do the important stuff ` cd /var/lib/docker ; umount devicemapper `
* now you are good to go `rm -rf /var/lib/docker`
cheers .. now install docker from start and things should fine...
please be advised to use latest docker version 1.5 :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment