Vagrant Commands for Not So Everyday Laravel Homestead Usage & Housekeeping

I’m going to update Lar­avel Home­stead from 7.1.2 to 7.6.0. This blog post will doc­u­ment the upgrade steps & also some Vagrant house­keep­ing tips.

I pre­vi­ous­ly installed Home­stead via git to ~/laravel/Homestead.

Let’s get most recent ver­sion of Homestead.
cd ~/laravel/Homestead
git pull

Since Home­stead is under con­stant devel­op­ment it’s safer to use a tagged release. This helps ensure you’re work­ing with a sta­ble ver­sion. I’m going to use 7.6.0.

git checkout v7.6.0

Remove pre­vi­ous Home­stead VM #

I want to ensure I’m using the most recent Home­stead VM so I’m going to delete the cur­rent one. 

IMPOR­TANT
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 Home­stead VM.
vagrant up --provision

Free up disk space by remov­ing old Vagrant box­es #

Check what Vagrant Home­stead box­es are installed.
vagrant box list

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

Let’s remove the old­er box. vagrant box remove laravel/homestead --box-version=6.0.0

That’s it for now. Do you know any oth­er uncom­mon but use­ful Vagrant/​Homestead tips? Please send them my way. 

1 This is also good time to check if you are run­ning most recent ver­sion of Vagrant vagrant version


Alex Aguilar, Partner, Software Engineer

Alex Aguilar

Partner, Software Engineer