Install Vagrant

read version < <(
  curl -s "https://releases.hashicorp.com/vagrant/" \
    | xmllint --html --xpath 'string(/html/body/ul/li[2]/a/@href)' - 2>/dev/null \
    | sed -re 's!^/vagrant/([0-9\.]+)/$!\1\n!'
)
read arch < <(
  uname -m
)

read tmpfile < <(
  mktemp -d
)

wget -P "${tmpfile}" "https://releases.hashicorp.com/vagrant/${version}/vagrant_${version}_${arch}.deb"

dpkg -i "${tmpfile}/vagrant_${version}_${arch}.deb"

rm -rf "${tmpfile}"

vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-disksize

Upgrade

If you run into issues while upgrading, try running these:

vagrant plugin repair

# NOTE: this will uninstall all plugins, and attempt to reinstall them (no version change)
vagrant plugin expunge --reinstall

Uninstall

dpkg -r vagrant