A while ago, I wrote about a way of easily backing up your Windows drivers. Believe it or not, there’s a fairly simple way to do it for (most) of your apps too, making setting up new machines fairly simple. You can also update all the apps using a similar method. So let’s have a look.
Updating all your packages
Windows now includes a package manager not that dissimilar to Linux. You can use this package manager to update your apps – well, apps where there is a repository available.
So, how do we update those apps? It’s easy. Start an elevated command prompt and use this command:
winget upgrade –all
…and this is what it looks like:

If this is the first time you’ve run this process, you may be surprised by how many updates there are, so it could take a few minutes. When it’s done, you’re all up to date.
Backing up your packages
The process to backup your packages doesn’t actually backup the packages – what it does, is it makes a list of the packages you have installed, enabling re-installation on a new machine simple. Bear in mind not all packages will have an available source, but I find that most do. To backup the packages, again start an elevated command prompt, and use the command:
winget export -o c:\packages.json
You’ll see an output similar to this:

You will see a lot of entries stating packages were not available – for the most part, these seem to be system components, and for some versions of Microsoft Office (mine is quite highly customised for example).
The output is a single .JSON file – copy that off somewhere.
Reinstalling Your Packages
To use that .JSON to install on a new system, use the following command:
winget import – i c:\packages.json
This will import/install what it can, and get you far closer to a fully deployed system than doing everything manually.
It’s quite a powerful tool that WinGet, so worth the effort to get familiar with.
Leave a Reply