Default local vcpkg binary cache

By default, vcpkg creates a local binary cache. This saves time when installing a package that has been previously installed in the same machine.

The location of the default binary cache depends on your operating system.

By default, binary caching is enabled at the first valid location among the following:

  • The location specified by the VCPKG_DEFAULT_BINARY_CACHE environment variable
  • %LOCALAPPDATA%\vcpkg\archives
  • %APPDATA%\vcpkg\archives

By default, binary caching is enabled at the first valid location among the following:

  • The location specified by the VCPKG_DEFAULT_BINARY_CACHE environment variable
  • $XDG_CACHE_HOME/vcpkg/archives
  • $HOME/.cache/vcpkg/archives

Use the VCPKG_DEFAULT_BINARY_CACHE environment variable to change the default binary cache location.

The default binary cache uses a files provider. This type of binary cache provider stores binary packages as compressed archives in a filesystem directory.

Disabling the default binary cache

To disable the default binary cache, set the VCPKG_BINARY_SOURCES environment variable to clear.

$env:VCPKG_BINARY_SOURCES="clear"
set VCPKG_BINARY_SOURCES=clear
export VCPKG_BINARY_SOURCES=clear

Next steps

Here are other tasks to try next: