Vagrant Commands for Not So Everyday Laravel Homestead Usage & Housekeeping

I’m going to update Laravel Homestead from 7.1.2 to 7.6.0. This blog post will document the upgrade steps & also some Vagrant housekeeping tips.

I previously installed Homestead via git to ~/laravel/Homestead.

Let’s get most recent version of Homestead.
cd ~/laravel/Homestead
git pull

Since Homestead is under constant development it’s safer to use a tagged release. This helps ensure you’re working with a stable version. I’m going to use 7.6.0.

git checkout v7.6.0

Remove previous Homestead VM #

I want to ensure I’m using the most recent Homestead VM so I’m going to delete the current one.

IMPORTANT
Make sure to back up any local databases.

vagrant global-status1

id       name        provider      state       directory
--------------------------------------------------------------------------------------
ed4fd11  homestead-7 vmware_fusion not running /Users/alexagui/Code/laravel/Homestead

vagrant destroy ed4fd11

Now we’re ready to start up a fresh Homestead VM.
vagrant up --provision

Free up disk space by removing old Vagrant boxes #

Check what Vagrant Homestead boxes are installed.
vagrant box list

laravel/homestead (vmware_desktop, 6.0.0)
laravel/homestead (vmware_desktop, 6.1.0)

Let’s remove the older box. vagrant box remove laravel/homestead --box-version=6.0.0

That’s it for now. Do you know any other uncommon but useful Vagrant/Homestead tips? Please send them my way.

1 This is also good time to check if you are running most recent version of Vagrant vagrant version


Alex Aguilar, Partner, Software Engineer

Alex Aguilar

Partner, Software Engineer