I need to update laravel/homestead? It is a Vagrant box. I'm using it for my dev environment.
I remember it was a shell command but I don't remember the command and I cannot find it. Please help
This is the sequence I came up with recently (Apr 2020) to upgrade my vagrant box from 9.2.x to 9.5.x
If the VM is not running first do:
vagrant up
Then go into the VM:
vagrant ssh
and back up the databases:
mysqldump -u homestead --all-databases > homestead-backup.sql
copy the resulting file to the host machine (only if the above command was not run in a mapped folder)
Close the ssh connection:
exit
then run:
vagrant box update
vagrant destroy
vagrant box prune
Answer yes to all questions. Then
git fetch
git pull origin release
Start the VM again:
vagrant up
once it's started (it will take longer this time) go into the VM:
vagrant ssh
and restore the databases (copy the backup file over from the host if it was not in the mapped folder)
mysql -u homestead < homestead-backup.sql
Use below command
homestead update
If this doesn't work
homestead box update
If this also doesn't work at all
This command will tell you the state of all active Vagrant environments on the system for the currently logged in user.
vagrant global-status
vagrant box update "laravel/homestead"
I hope i am clear now!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With