DEV Community

Discussion on: vagrant up ssh update upgrade dist-upgrade

jdickey profile image
Jeff Dickey • Edited on

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.