How do I upgrade Vagrant to the latest version in Ubuntu?

The official Download Vagrant webpage has all the available downloads for the latest version of Vagrant (2.0.1). Please download the proper package for your operating system (Linux deb) and architecture (32-bit or 64-bit OS). You can find SHA256 checksums for packages here.

Download the .deb file and double-click it to open it for installation in the Ubuntu software application. The new installation will properly overwrite and remove old files. It is recommended that no other Vagrant processes are running during the upgrade process.

The names of the vagrant .deb files are as follows:

  • 32-bit architecture: vagrant_2.0.1_i686.deb
  • 64-bit architecture: vagrant_2.0.1_x86_64.deb

...where 2.0.1 in the above is the version number of the latest version of Vagrant from the official download Vagrant webpage, which changes whenever the latest version of Vagrant is updated. The latest version of Vagrant from the official download Vagrant website current to the last time this answer was edited is Vagrant 2.2.6.

If you download the text file that has the SHA256 checksums for Vagrant packages, you will find the same two package names and their SHA256 checksums.


If you don’t want to have to update manually, I’ve created a repository which provides the latest packages from HashiCorp Vagrant in a PPA format. To use it, you’ll need to add the repository to your Ubuntu repository sources like this:

sudo bash -c 'echo deb https://vagrant-deb.linestarve.com/ any main > /etc/apt/sources.list.d/wolfgang42-vagrant.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key AD319E0F7CFFA38B4D9F6E55CE3F3DE92099F7A4
sudo apt-get update

Now install as usual:

sudo apt-get install vagrant

These are the same files as on the Vagrant download page, just put into a repository.


For servers, the following will first authenticate and then install Vagrant version 2.0.2 (currently the latest) on Ubuntu x64:

curl -O https://releases.hashicorp.com/vagrant/2.0.2/vagrant_2.0.2_x86_64.deb
curl -O https://releases.hashicorp.com/vagrant/2.0.2/vagrant_2.0.2_SHA256SUMS
curl -O https://releases.hashicorp.com/vagrant/2.0.2/vagrant_2.0.2_SHA256SUMS.sig
curl -sS https://keybase.io/hashicorp/key.asc | gpg --import
gpg --verify vagrant_2.0.2_SHA256SUMS.sig vagrant_2.0.2_SHA256SUMS
shasum -a 256 -c <(cat vagrant_2.0.2_SHA256SUMS | grep 64.deb) -s
sudo apt install ./vagrant_2.0.2_x86_64.deb

Tags:

Ubuntu

Vagrant