Template:Build Documentation apt-cache
Using an apt cache will greatly improve build speed when building several times in a row (e.g. when debugging, during development).
If you are interested, click on Expand on the right.
In short: Just get an apt cache running and set the REPO_PROXY environment variable.
sudo apt-get install apt-cacher-ng
Be sure to have a firewall, so the whole internet can not use the apt-cacher-ng service.
sudo REPO_PROXY=http://127.0.0.1:3142 ./whonix_build ...
When building inside a non-Whonix VM, an apt cache can be used on the host. In that case, adjust the IP accordingly and manually test that it is reachable. When building inside a (Whonix) VM, just install the apt cache inside the VM and point to a localhost apt cache.