DEV Community

Discussion on: vagrant up ssh update upgrade dist-upgrade

Collapse
 
japracool profile image
japracool

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

So these 3 commands above will update my Vagrant?

Collapse
 
psnebc profile image
Patrick Schanen

The installed System yes not more. In this case Ubuntu 16.04.3 LTS

Collapse
 
jdickey profile image
Jeff Dickey • Edited

After the dist-upgrade (or full-upgrade), next time you vagrant ssh in, Ubuntu will remind you that the system must be rebooted to enable changes to system files. If you run sudo shutdown -r now at that point, your Vagrant ssh session will end and you will apparently not be able to start a new one.

However, running vagrant box remove $YOUR_BOX_NAME followed by vagrant up will rebuild your VM with a fully updated Ubuntu (where $YOUR_BOX_NAME is, e.g., ubuntu/eoan64).

If someone can explain to me why this works, I'd be grateful. I thought vagrant box remove removed the VM from e.g.. VirtualBox; apparently it's a bit more complicated than that.