TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/microsoft/winget-cli/llms.txt
Use this file to discover all available pages before exploring further.
import command installs packages listed in a JSON file created by the export command.
Syntax
Required Arguments
Path to JSON file containing package list
Options
Import file path (alternative to positional argument)
Continue if some packages are not found
Install latest versions instead of specified versions
Skip packages that are already installed
Accept all license agreements
Accept all source agreements
Examples
Import packages:Import Process
The import command:- Reads JSON file
- Validates package identifiers
- Checks which packages are already installed
- Installs or upgrades packages as needed
- Reports results for each package
Output
Import File Format
Expects JSON format fromwinget export:
Behavior Flags
—ignore-unavailable
Continues installation if some packages aren’t found:—ignore-versions
Installs latest versions instead of specified versions:—no-upgrade
Skips packages already installed (no upgrade):Use Cases
New System Setup
Quickly set up a new machine:Restore from Backup
Restore after system reset:Team Onboarding
Standardized developer setup:Testing
Set up test environment:Error Handling
By default, import stops on first error. Use--ignore-unavailable to continue:
Exit Codes
0- All packages installed successfully0x8A150025- Import file not found or invalid0x8A150028- Some packages failed to install0x8A150001- Package not found (without —ignore-unavailable)
The import command respects package pins. Pinned packages won’t be upgraded unless forced.
Importing installs packages in the order they appear in the JSON file.