When you buy a new PC or reinstall Windows, the part that actually eats your time is not installing Windows. Hunting down and reinstalling every app you normally use, the browser, the archiver, the editor, the messengers, takes far longer. Find the installer, click Next, finish, then start over with the next app.
winget, which ships with Windows, cuts this process down. You save the list of apps installed on your current PC to a single file, and on the new PC you read that file and install everything in one pass. There is no separate program to buy and no folder of installers to keep.
It is useful when you replace a PC, when you reinstall Windows, and when you want two machines, say a desktop and a laptop, to carry a similar set of apps. Just remember what actually moves: only the list of which apps to install. Settings inside the apps and your sign-in information do not come along, and I will go over that separately below.
First, check that your PC has winget
Open Windows Terminal or PowerShell and type:
winget --version
If a version number appears, you can use it right away. If you get a message saying the command was not found, update “App Installer” from the Microsoft Store and check again. winget arrives through App Installer, and its updates come the same way.
Step 1: Save the current PC’s app list to a file (export)
The command is one line:
winget export -o "$env:USERPROFILE\Desktop\my-apps.json"
A file named my-apps.json appears on your desktop, holding the names (package IDs) of the apps installed on this PC. As Microsoft explains, export tries to export every application installed on the PC, but apps that are not connected to a source cannot be included, and a warning appears for those. A warning does not mean failure. Every app that does make the list is one less app to reinstall by hand.
One thing to watch: the command above is written for PowerShell. Run it in Command Prompt (cmd) and $env:USERPROFILE does not expand, which causes a path error (0x8007007b). In cmd, write it with %USERPROFILE% instead: winget export -o "%USERPROFILE%\Desktop\my-apps.json".
If you need exact versions preserved, for development tools for example, add the option that saves versions too:
winget export -o "$env:USERPROFILE\Desktop\my-apps.json" --include-versions
Pinning versions means the new PC gets the same versions. The downside is that if a version becomes unavailable over time, its install can fail, so unless you really need it, the basic command is the safer default.
The saved file is a text file you can open in Notepad or VS Code. If it contains apps you do not need on the new PC, delete that app’s entry (the block containing its PackageIdentifier) and save. Microsoft itself documents this workflow of editing the file after export to remove apps you will not import. Apps you only used on the old PC, or installed as trials, are best cleaned up at this point.
Once the file is ready, copy it to a USB drive or somewhere like OneDrive. After you replace the PC, you cannot start without this file, so keep it somewhere that survives a reinstall rather than only in a documents folder that gets wiped.
Step 2: Install everything from the one file on the new PC (import)
On the new PC, open Windows Terminal or PowerShell and point it at the file you copied over. The example below assumes the file is on the desktop:
winget import -i "$env:USERPROFILE\Desktop\my-apps.json" --accept-package-agreements --accept-source-agreements --ignore-unavailable
You only need to know three options. –accept-package-agreements and –accept-source-agreements pre-accept the agreement prompts that appear during installation; without them, installation stops at every app and waits for you to confirm. –ignore-unavailable means that even if an app in the list is currently unavailable, the rest still install instead of the whole run stopping on an error.
Once installation starts, apps install in list order. Apps that are already installed are skipped with a notice, so if the run is interrupted and you run the same command again, it does not reinstall everything from the top.
If you import a file that was saved with versions (–include-versions) but do not need to match those old versions, add this option:
winget import -i "$env:USERPROFILE\Desktop\my-apps.json" --ignore-versions --accept-package-agreements --accept-source-agreements --ignore-unavailable
With –ignore-versions, winget ignores the versions written in the file and installs the latest version it can get.
What to check after installation finishes
When import finishes, setup is not quite done. Start with the apps that were not in the list. Apps that triggered warnings at export time, apps you installed directly from a manufacturer’s site, and some Microsoft Store apps can be missing from the list. Run the winget list command to see what is installed on the new PC, and install only the missing ones by hand.
App settings and sign-ins also need separate attention. Browser extensions, editor settings, and messenger sign-ins are not in this file. Apps that sync their settings bring them back when you sign in, but for apps that do not, back up the settings files separately. For apps that can export settings, like VS Code, I keep that file in the same folder as my-apps.json.
Remember that for paid apps, installation and license activation are two different things. Installation happens automatically, but apps that require a product key or account details have to be launched and activated to finish.
Wrapping up
One export and one import turn the repetitive work of reinstalling apps into a single command run. Not everything moves automatically, but turning the time you spent searching for and installing dozens of apps one by one into waiting time is already a big felt difference.
The reason I like this method is that the list file itself becomes a record. Re-export from time to time as your app set changes, and that file is, in effect, “the list of apps I normally use.” Even if you have no plans to buy a new PC right now, it is worth making one on your current PC. PCs have a habit of failing without warning.
For reference, there is also winget configure, which goes beyond app installation and matches developer mode and various settings from a single file. Going straight there makes the file format complicated, though. It is better to get comfortable moving just the app list with export and import first; configure is a topic for a later post.
[…] the previous post I covered saving your current app list to a file with winget export and installing everything at […]
[…] How to Move Your Installed Apps to a New PC With winget Export and Import […]