How to update vcpkg itself?

Viewed 4728

I have installed vcpkg, a package manager for C++. Now after some time, I'd like to update it. How can I do that? Do I need to uninstall and reinstall?

2 Answers

The best way to update a vcpkg git clone is to do

  • save a list of all installed ports somewhere
  • git pull
  • delete the <vcpkg_root>/installed/ directory
  • rerun bootstrap.bat or bootstrap.sh
  • reinstall all ports:triplets you need

Note:

  • there is a vcpkg upgrade/update command but it is discouraged since it is not transactional
  • in general you don't need to run re integrate but sometimes it is necessary vcpkg integrate remove/install

The vcpkg community on Github provided an official answer on their FAQ. They suggest pulling the repo and running the bootstrap script.

Related