Every time you clean and install the Windows operating system, the biggest trouble is to get back all apps and third-party software on your PC. You can take the help of the respective OEMs driver update utility to install the bare minimum drivers but that still leaves out third-party apps.

What if you could import all these apps at once on your PC? Well, the Windows Package Manager aka Winget offers an import and export feature that saves you the trouble of downloading and installing each app separately. This guide will elaborate on both the export and import feature of Winget and its shortcomings. Let’s begin.

What's Winget?

Winget is an acronym for Windows Package Manager. It is a command-line tool which means you have to use CMD or PowerShell to run the tool. There is no official GUI interface available for the tool. Being an official app, it makes it easy for command-line users to manage application packages on their systems.

Rather than searching the web or Microsoft Store for apps, they can use Winget from the command line and search for any app listed in the repository. You can use Winget to install, uninstall, update, or even batch install or remove apps on Windows 11. But we will confine this post to the export and import feature only.

How to Export Apps Using Winget in Windows 11

Winget can export the list of installed apps into a JSON file. The file contains the package name, identifier, source details, and some more options. You can even export the app list into a text file, either of these file types works while importing. However, there are some caveats to this export process.

Firstly, this method only exports the installed apps list which is available in the Winget repository. It excludes Microsoft Store and third-party apps that aren’t yet listed in the Winget Repository. Moreover, it only exports the list of apps and doesn’t create any backup copies of actual app files. You will have to download all these apps and will need an internet connection to do so because Winget is an online-only utility.

Repeat the following steps to export the app list using Winget:

  1. Press Win + R to open the Run dialog box. Type cmd and press Ctrl + Shift + Enter to launch Command Prompt with administrator privileges.
  2. The command syntax to export the app list is: winget export -o output location\filename.json. So, our actual command becomes:
            winget export -o C:\apps.json 
        
  3. Paste the code in the Command Prompt window and press Enter key. It will create a JSON file with the name “apps” and save it in the C drive.
    Export Apps Using Winget in Windows 11
  4. To export the app list to a text file, type the following command and press the Enter key:
            winget export -o C:\apps.txt
        
  5. You will see multiple “Installed package is not available from any source:” warning messages. These are the apps that you will have to manually install again.
  6. Now, copy the exported file to a USB drive and save it on OneDrive or any other cloud storage service.

How to Edit the Exported JSON File

After exporting the installed apps JSON file, you may not need all the apps included in the list on your new PC. So, you can weed out a few not-so-useful packages from the JSON file. Here’s how to do it:

  1. Go to the folder location of the exported JSON file. Right-click on the file and select the Open With option.
  2. Click on the Notepad option. The file will open in a new Notepad window. Navigate to the "Packages" section.
  3. Now, to remove a package you must remove a complete chunk of the code from the file. In our JSON file, we want to remove the Afterburner package. So, we will remove a block right from the opening bracket “{“ to the closing “,” of a package name.
    Edit the Exported JSON File
  4. Our modified JSON file looks like this now. You must also remove any package name in the file in an identical manner.
    Edit the Exported JSON File 2
  5. Now, your modified JSON file is ready for export. Don’t mess around with any other block in the JSON file, or you will encounter errors when you try to import it afterward.

How to Import Apps Using Winget in Windows 11

Repeat the following steps to import the JSON or Text file in Winget and then install all the apps:

  1. Launch Command Prompt with administrator privileges.
  2. First, you need to update the Winget sources. Type the winget source update command and press the Enter key to update all the sources.
  3. To export the JSON file type the following command and press the Enter key:
            Winget import -i C:\apps.json
        
  4. To export the Text file type the following command and press the Enter key:
            Winget import -i C:\apps.txt
        

Normally, this command should work fine but many users face an error while executing the import command. It is because some apps require you to accept source agreements and package agreements. So you must add the --accept-package-agreements and --accept-source-agreements arguments to the command.

  1. Type cls in the Command Prompt window to clear the window. Now, type the import command with the following arguments and press the Enter key:
            Winget import -i C:\apps.json --accept-source-agreements --accept-package-agreements
        
  2. Now, all the apps will begin downloading and installing one by one. Wait until all the apps install on your system and then close the command prompt window.
    Import Apps Using Winget in Windows 11

What About the Apps Not Included in the Exported File?

Winget does leave out a lot of apps that aren’t present in its repository. It also excludes the apps available on Microsoft Store because you can install them with one click after you sign in with the same account on another PC. But if you wipe everything on your PC and do a clean install, there’s no way to know the complete list of third-party programs previously installed on your PC.

But you can create a text file of all the excluded apps displayed in the Command Prompt window. Type the following command and press Enter:

winget export -o C:\apps.json > C:\e.txt

The above command will create a Winget export file called apps.json. It will also create a text file that will contain the complete output displayed in the Command Prompt. You can create a backup copy of this file and later use it to manually download and install the excluded apps.

Import Apps in One Click on Windows

Installing multiple apps on a new Windows 11 PC is a surmounting challenge but Winget solves this problem to some extent. It will help you download all the apps included in its official repository using the exported file. Your games and some third-party software will be left out, but you can use the text file to identify the missing ones and install them manually.