Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading Vagrant in Ubuntu 16.04

I currently have Vagrant 1.8.1 installed in my Ubuntu 16.04

I'm thinking to upgrade it to Vagrant 2.0.0

The problem is I'm not sure if my vagrant files and VMs gets removed if I directly install Vagrant 2.0.0 using apt-get install vagrant.

Is it safe to update using apt-get or is there any way to do that.

like image 293
Sukumar Avatar asked Oct 29 '17 09:10

Sukumar


People also ask

How do I install the latest version of vagrant?

To get started with Vagrant, download the appropriate installer or package for your platform from our Vagrant downloads page. Install the package with the standard procedures for your operating system.

How do I update vagrant files?

Command: vagrant reload [name|id] The equivalent of running a halt followed by an up. This command is usually required for changes made in the Vagrantfile to take effect. After making any modifications to the Vagrantfile, a reload should be called. The configured provisioners will not run again, by default.

How do I know my vagrant version?

Command: vagrant version If you only want to see the currently installed version, use vagrant --version .


1 Answers

Vagrant repository probably not updated to the latest version, this is the reason that it always install older version when apt-get install vagrant command is used.

The easiest way to pull and install latest version using terminal is to find the path to the .deb file and install it using dpkg

You may get the list of all the vagrant updates here,

https://releases.hashicorp.com/vagrant/

I got this as latest version from above archive,

https://releases.hashicorp.com/vagrant/2.0.4/vagrant_2.0.4_x86_64.deb

Once you have that link, delete previous version of vagrant (if it is installed) as follows,

sudo apt-get remove --auto-remove vagrant
rm -r ~/.vagrant.d

and install newest version,

wget https://releases.hashicorp.com/vagrant/2.0.4/vagrant_2.0.4_x86_64.deb
sudo dpkg -i vagrant_2.0.4_x86_64.deb

Once done, you can verify if its successfully installed,

vagrant version
like image 190
Sufiyan Ghori Avatar answered Oct 13 '22 04:10

Sufiyan Ghori