# create an example ubuntu box
vagrant init bento/ubuntu-18.04
# deploy it
vagrant up
# connect to the box over ssh
vagrant ssh
# install what ever you want
sudo apt-get install ...
# clear apt cache
apt-get clean
# clear bash history and exit
cat /dev/null > ~/.bash_history && history -c && exit
# shut down
vagrant halt
# create box from existing box
vagrant package --output package.box
# add the box to .vagrant.d (vagrant home)
vagrant box add --name mynewbox file:///d:/package.box
# you can use it now
vagrant init mynewbox
You can manualy upload new box from: https://app.vagrantup.com/boxes/new