This question already has an answer here:

I'm trying to install the latest version of Git. The ubuntu installser apt-get install versions 1.9.1, while the latest version is 2.9.1.

The same thing happens with Docker. Apt-get installs only version 1.11.2 while the latest version of Docker is version 1.12. I want to install the latest version of Docker, that is version 1.12 to work with the latest features.

Is there a way of specifying to install the latest version?

marked as duplicate by steeldriver, Terrance, Pilot6, heemayl, Eric Carvalho Jul 15 '16 at 18:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Latest versions are not necessarily available for stable distributions. This is partly a safety measure, and also reflects that building stable distributions is a lengthy process, which takes time. More recent versions are added from time to time. You need to manually install the latest version, at your own risk. – user308164 Jul 15 '16 at 13:03

The easiest way is to add the PPA for Git release candidates by the "Ubuntu Git Maintainers" team at https://launchpad.net/~git-core/+archive/ubuntu/candidate:

sudo add-apt-repository ppa:git-core/candidate
sudo apt-get update
sudo apt-get upgrade

Note that the "Ubuntu Git Maintainers" team also maintains a PPA for Git stable releases, but since you said you wanted the "latest" version, the PPA for Git release candidates may fit your preference better. In many cases, both PPAs give you the same latest version of Git (2.9.1 as of when this post was written).

Not the answer you're looking for? Browse other questions tagged or ask your own question.