# add the new gpg key
$ apt-key adv --keyserver --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# edit your /etc/apt/sources.list.d/docker.list
$ vim /etc/apt/sources.list.d/docker.list
# remove the contents and replace with the following depending on your os and version:
# Ubuntu Trusty
deb https://apt.dockerproject.org/repo ubuntu-trusty main
$ apt-get update
# remove the old
$ apt-get purge lxc-docker*
# install the new
$ apt-get install docker-engine