How to use Windows 10’s new native package manager

0


Microsoft has finally revealed a long-requested feature; a Windows package manager called Winget which allows you to easily install apps from the command line.

Commonly used in Linux to install new applications, package managers are tools that automate the installation, upgrade, and removal of applications.

It does this by looking at configured repositories, or sources as Microsoft likes to call them, for applications. If the app is available, it will download it from the repository and install it on the computer.

What makes package managers so interesting is that they also handle dependencies before installing the requested program.

This means that if you try to install a program and it needs another program to run, the package manager will automatically install that required program as well.

Third-party Windows package managers like Chocolatey and Ninite already exist, but what makes winget so special is that it is developed by Microsoft and will eventually be integrated into Windows.

How to install the wing

As the Winget Windows Package Manager is currently in preview, Microsoft has provided two ways to install it in Windows 10.

Method 1: Install via Windows 10 Insider builds

If you are a Windows Insider, you can sign up for the Windows Package Manager Insiders program with the same Microsoft account email address that you use on your Insider build.

Once approved, the Microsoft Store will upgrade the App Installer package on your Windows 10 Insider build and you will now have access to the winget command.

Method 2: Download the latest appxbundle from Winget’s GitHub page

The easiest method, and one that can be used by all Windows 10 users, is to download the latest version from Winget’s GitHub versions page.

Once downloaded, double click on the Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle file and the App Installer program will run.

When the following screen appears, click the Update button.

Update the app installer
Update the app installer

When complete, the application installer screen will say “For the application to work properly, try launching a Windows application package”. At this point, close the App Installer window.

You will now have access to the winget command.

Using the Windows 10 Winget Package Manager

With this initial release of the Winget Package Manager, Microsoft’s goal was to put insight into the hands of users so that they can start playing with it.

For this reason, current controls are mostly designed to to install, spectacle, and to look for for applications using the package manager.

To see a complete list of commands for Windows Package Manager, just type winget at a PowerShell or CMD prompt and a help screen will appear.

Winget help menu
Winget help menu

To see help for each command, you can simply type the specific command and follow it with a -?.

For example, to display the help screen for the installation command, you would type the command:

winget install -?
Winget installation help screen
Winget installation help screen

Parcel search

To find a package to install, you can use the winget search order. When searching for a particular keyword, winget will return results for all packages whose name contains that string.

For example, to find all packages containing the word note, we would use the command:

winget search note 
Using the winget search command
Using the winget search command

As you can see, Notepad ++ and Evernote have been listed because they both contain the string ‘note’.

If you want to see a list of all available packages, you also type winget search without any arguments, and the full list will be displayed.

It is most useful when using the winget search | more command to see a list of packages one page at a time.

Use winget to list all packages
Use winget to list all packages

Get package information

To see more information about a particular package, you would use the winget show order.

For example, to see details about Notepad ++, including version, license, program description, developer, and where it will be installed from, we use the following command:

winget show notepad++
Using the winget show command
Using the winget show command

Install a package

When you have decided which package you want to install, you use the winget install order.

For example, to install Notepad ++, we would use the following command to download and install it from the developer’s website or the GitHub repository:

winget install Notepad++
Using the winget installation command
Using the winget installation command

It should be noted that the winget package manager does not currently keep any track of your installed packages.

You can therefore install a program via winget even if it is already installed.

Winget currently does not have the option to uninstall a package, but version 1.0 is scheduled for release in May 2021.

For now, if you install an app using winget, you will need to use the normal Apps & Features settings screen to uninstall the program.

List package repositories

As we explained earlier, package managers allow you to add repositories, or sources, which will be used to find applications to install.

While Microsoft plans to allow you to add multiple repositories in the future, at this point winget only lets you configure one at a time.

To manage your repositories / sources, you can use the winget source order.

For example, to see the current repository configured in winget, you can type the following command:

wget source list
Using the winget source command
Using the winget source command

As you can see, the default repository for winget is the one maintained by Microsoft at https://winget.azureedge.net/cache.

Currently, the default Microsoft repository contains 278 apps, including popular apps like VLC Media Player, Notepad ++, Epic Games Launcher, Wireshark, and Plex.

The full list of available apps is available on the GitHub page of the repository.

Future projects for winget, the Windows package manager

Microsoft plans to release Winget 1.0 in May 2021 and has a list of features it would like to add.

Some of the features planned for Winget 1.0 include:

  • Dependency management
  • Uninstall apps
  • Install apps from the Microsoft Store
  • Update one or all installed applications
  • List of installed applications
  • Group Policy Control
  • Support for silent installations, although this can be used by threat actors when installing malware from their own repositories.

This is an exciting roadmap, and for those of you who typically work from the command line, winget will ultimately prove to be a popular tool.

This is even more true when you can add your own repositories from which to install apps.


Share.

Comments are closed.