import command (winget)

March 25, 2026 ยท View on GitHub

The import command of the winget tool imports a JSON file of apps to install. The import command combined with the export command allows you to batch install applications on your PC.

The import command is often used to share your developer environment or build up your PC image with your favorite apps.

Usage

winget import [-i] <import-file> [<options>]

:::image type="content" source="./images/import-help.png" alt-text="Screenshot listing winget import command help options." lightbox="./images/import-help.png":::

Arguments

The following arguments are available.

ArgumentDescription
-i,--import-fileJSON file describing the packages to install.

Options

The options allow you to customize the import experience to meet your needs.

OptionDescription
--ignore-unavailableSuppresses errors if the app requested is unavailable.
--ignore-versionsIgnores versions specified in the JSON file and installs the latest available version.
--no-upgradeSkips upgrade if an installed version already exists.
--accept-package-agreementsUsed to accept the license agreement, and avoid the prompt.
--accept-source-agreementsUsed to accept the source license agreement, and avoid the prompt.
-?,--helpShows help about the selected command.
--waitPrompts the user to press any key before exiting.
--logs,--open-logsOpen the default logs location.
--verbose, --verbose-logsUsed to override the logging setting and create a verbose log.
--nowarn,--ignore-warningsSuppresses warning outputs.
--disable-interactivityDisable interactive prompts.
--proxySet a proxy to use for this execution.
--no-proxyDisable the use of proxy for this execution.

JSON Schema

The driving force behind the import command is the JSON file. You can find the schema for the JSON file in the Windows Package Manager Client repo on GitHub.

The JSON file includes the following hierarchy.

EntryDescription
SourcesThe sources application manifests come from.
PackagesThe collection of packages to install.
PackageIdentifierThe Windows Package Manager package identifier used to specify the package.
Version[optional] The specific version of the package to install.

Importing files

When the Windows Package Manager imports the JSON file, it attempts to install the specified applications in a serial fashion. If the application is not available or the application is already installed, it will notify the user of that case.

:::image type="content" source="./images/import-command.png" alt-text="Screenshot of entering the winget import command in a command line of Windows Terminal." lightbox="./images/import-command.png":::