Family Best Time >> Electronics

How to effectively use OneGet on Windows 10

If you've ever used Linux, you've always wanted a package management tool for Windows. Yes, Windows has a third-party package management tool called Chocolatey that can be run using the command line. But Windows 10 introduced OneGet, a native package management tool, as announced by Microsoft's Garret Serack in a blog post. It will allow you to install/uninstall and update software packages with NuGet Package Manager using Powershell. Besides, it also supports Chocolatey repository.

ContentsWhat are OneGet (PackageManagement) and Chocolatey?How to use OneGet?Getting package sourcesInstalling ChocolateyInstalling software from Chocolatey repositoryNo upgrade commands availableExplore How to effectively use OneGet on Windows 10

Note: With the Windows 10 RTM release, OneGet has been renamed to Package Management .

So let's see how you can efficiently install/uninstall and update multiple software packages using OneGet (PackageManagement). And, also, see how to integrate Chocolatey into it.

What are OneGet (PackageManagement) and Chocolatey?

For non-Linux users and those unfamiliar with package management, Package Manager makes it easy to install, update, and uninstall software (package). The package manager uses a repository where all software packages are stored.

You just need to enter a command to get these software packages and install them on your PC. With a single command, you can install or update the software. The update is performed automatically whenever the software is updated in the repository. So that's what it's all about.

Now OneGet as a tool has a head start. It is a manager of a package manager . It can host multiple repositories like Chocolatey and NuGet. We've talked about Chocolatey before. Chocolatey can work with the command prompt. NuGet contains software packages specific to Microsoft's application development tools. You can enter a single command and grab software from these repositories.

How to use OneGet?

So, let's first see the available commands. You can see it in the feature image above. To see the available commands, type the following command in Powershell.

Remember, not OneGet but PackageManagement (I'm writing OneGet here just for simplicity). So, now you have the list of commands. Now let's start by checking what package sources (package managers) we have.

Get package sources

Type the following command (or simply copy it):

You should get the package sources installed on your system.

How to effectively use OneGet on Windows 10

So, I only installed the built-in PowerShell gallery. Now let's install the Chocolatey package manager. If you already see Chocolatey listed, skip the next step.

Installing Chocolatey

Enter the following command:

Get-PackageProvider will find the available package repositories and install it.

How to effectively use OneGet on Windows 10

Hit Enter and the installation of Chocolatey should begin. Once the installation is complete, check the package source again with the command you applied before. You should see Chocolatey.

Next, we need to set Chocolatey as the default software package source. We will use set-packagesource command to set it as default. Enter the following command:

How to effectively use OneGet on Windows 10

Now that everything is ready, let's install some software from the Chocolatey repository.

Install the software from the Chocolatey repository

You get more options with Chocolatey. You don't need to go to the Chocolatey website and find the software you want to install. You can find it from Powershell itself using the find-package order. So let's say you want to search for all packages related to "Chrome".

How to effectively use OneGet on Windows 10

Now you will get all packages with Chrome keyword with a summary. Now from this list I will install Adblockpluschrome .

How to effectively use OneGet on Windows 10

Enter Yes and the installation will begin.

No upgrade-command available

Surprisingly, OneGet doesn't have an Update order. There is an update command in Chocolatey but that won't apply here. This issue was reported on GitHub in 2014 when Technical Previews were directed at Insiders and it has still not been resolved.

Do you want to become a command prompt ninja? Here is a list of function keyboard shortcuts that will make you one.

Explorer

Now that you know the basics, you can explore the commands and parameters further. If you think OneGet hasn't provided a top-notch service, you can always opt for Chocolatey and use it through the command line.

ALSO SEE: 3 Command Prompt Alternatives That Are Better Than the Default