How do I upgrade Vagrant to latest version in Ubuntu?
$ sudo apt-get update $ sudo apt-get install vagrant $ vagrant -v Vagrant 1.4
Latest version is 1.6.5
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
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:
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, Hashicorp now has an official repository you can install from to get automatic updates. To use it, just run:
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt-get update
Edit: this post originally described a third-party deb repository. Now that Hashicorp has an official one of their own I've updated it to describe that one.
NOTE: if you previously set up that third-party repository, there is an extra step you need to take to ensure you will get updates from the new repository. Please see the old repo instructions for details.
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
sudo add-apt-repository ppa:tiagohillebrandt/vagrant sudo apt update
This will add a repository for your actual ubuntu version. If you are on 20.10 (groovy) replace groovy with focal and call
sudo apt update again.
Then install vagrant again:
sudo apt install vagrant
And update all plugins:
vagrant plugin update
Some operating system distributions include a vagrant package in their upstream package repos. Please do not install Vagrant in this manner. Typically these packages are missing dependencies or include very outdated versions of Vagrant. If you install via your system's package manager, it is very likely that you will experience issues. Please use the official installers on the downloads page.
For upgrading vagrant to the lastest version, just download the package in accordance with your operating system distribution from their download page https://www.vagrantup.com/downloads
For ubuntu you can download the debian package and run
sudo dpkg -i your-downloaded-file.deb
Vagrant 2.2.6 installed and I could not upgrade it further using
apt-get. The latest version was 2.4.0.
I used Homebrew to install it on my Ubuntu 22.04 machine:
# sudo apt-get uninstall -y vagrant brew tap hashicorp/tap brew install hashicorp/tap/vagrant
vagrant --version # Vagrant 2.4.0
This installation mean is listed on the vagrant official documentation.