Package Management in Windows
Technology has made it easier to perform most tasks by eliminating manual work and replacing it with automated solutions. Therefore, when dealing with computers, you can save time and money by using a tool that manages your software. In this case, a package manager is an exceptional tool used to automate installing, upgrading, or uninstalling applications. As the name suggests, it deals with packages, which are defined as the collection of files that can be installed or removed as a group. When installed on Windows operating system, it frees you from the trouble of manually backing up data or the struggle of removing packages content.
Why CLI management
CLI is an abbreviation that in full means Command Line Interface. It is defined as a program that enables a user to type commands that instruct a computer on what to do. You can use CLI when directing a computer to perform a particular task. Additionally, it is a method used by users to interact with operating systems and applications. CLI was introduced in the past before the invention of a computer mouse where the keyboard was the only input device. It was later replaced by Graphical User Interface (GUI) which allows people to interact with applications and Operating systems directly.
In package Management, a command-line interface is applied when modifying the execution of processes and/ or packages. In their words, CLI helps a package manager in installing, updating, repairing, and removing software. Thus, you can manage packages with ease and run a graphical user interface in command mode. When managing your packages on Windows using Winget, you will simply use command prompt or PowerShell; text-based interfaces where you type a specific command, press ENTER, and wait for results.
Most individuals find it tiring to browse through the internet as they are searching for the official sites to download an application. However, Winget is the Windows Package Manager that makes this process much easier. Winget is a comprehensive package manager that has a command-line tool(CLI) for typing and executing commands, and other sets of services. Instead of installing software manually or clicking through a wizard, Winget CLI makes it possible to type commands that when processed automatically install, upgrade, configure or delete applications. Keep in mind that Winget CLI can update a program from the Windows package manager repository with just one command.
Features of Winget
- Installing applications
- Upgrading installed apps
- Lists all the installed software
- Shows description of existing programs
- Importing and exporting of installed packages
- Installs multiple apps at a go
- Manages the source of applications
- Offers command line help
- Has search command for finding basic information about a package
Winget install requirements
In order to have Winget installed on your machine, you can use certain options. As for the latest version of Winget, ensure you have installed either Windows 10 or 11, operating system. One way of getting this Windows Package Manager is from the Microsoft store on your computer. Otherwise, download the Winget set-up from the Github repository.
Install Winget CLI on Windows
As were have seen above, installing Winget CLI can be done using different methods. In this case, we will use Github to get the Winget setup.
Install Winget from Github
Search for the Github Winget CLI releases to download the file.
Scroll down on the page above until you get the asset section. Then go ahead and click on the .msixbundle file.
Find the file you have downloaded on your computer’s downloads.
Click on the downloaded Winget file and press on Install.
Note that, Winget CLI is mostly bundled on windows 10 and 11. Hence, after clicking on install, it will either start installing or Updating. In this case, Winget is already installed and only asks for an update. Note that App Installer is another name for Winget in windows.
Here is the updating process.
Confirm that Winget has updated by double-clicking on the downloaded file again. This screen will appear with either Reinstall or Cancel denoting that Winget is installed. Simply click on Cancel.
Install Winget from Microsoft
From your computer’s search bar, type Microsoft Store and click on open.
From the Microsoft store, search for Winget.
Microsoft Store will show that Winget or App Installer already exists. In case the Winget is not installed click on the install icon.it will automatically get installed on Windows.
Getting Started with Winget-CLI on Windows
The first step to using Winget CLI on Windows is opening it with a command prompt or Windows PowerShell.
Let’s start by opening CMD(Command Prompt). Search for the word cmd on the windows search bar then run it as an administrator. When a user account control dialog box appears, click on ‘Yes’ to continue.
After Command Prompt has opened, verify that Winget has been installed successfully by typing the name winget and then hitting on the Enter button. Winget version will be displayed together with a couple of commands and how they function.
Additionally, you can get more information about Winget when you type this command:
Example of Installing an Application using Winget
We have seen that you can use winget to install applications. In this example, let’s install Firefox Mozilla browser.
Type winget install mozilla on CMD then hit Enter button.
A prompt will appear asking you to agree with the terms of installing Mozilla.Type Y for Yes to agree.
Winget will start installing the application automatically.
Then Mozilla will successfully get installed on Windows using Winget.
You can proceed to confirm that Firefox Mozilla browser has been installed. Type the word Mozilla on your computer, open it and start browsing.
Upgrading an Application using Winget on Windows
To update packages installed on your computer using winget, type:
winget upgrade --all
Here is an example of software as it upgrades.
Winget will successfully upgrade applications to the latest versions.
Uninstalling an Application using Winget on Windows
In case you are wondering which command to use, Winget can display all the commands, and then you can choose from there. Type, winget –help, and access all the commands and their descriptions.
Additionally, check the application you want to uninstall using winget list command which displays all the applications installed on windows.
In most cases, the winget uninstall command will not work until you perform some actions.
Use the winget setting command to allow packages to be uninstalled. After entering this command a Json file will appear on notepad.
Add this information to the Json file
Save and close setting.json file.
Let’s go ahead and uninstall Mozilla browser. Keep in mind that if an application’s name has spaces between it, it should be enclosed with quotation marks.
On the command prompt type:
winget uninstall “Mozilla Firefox Browser”
The application will be removed by winget successfully.
Computer users have always wanted a simple yet powerful package manager for windows. Thus winget has provided a solution for installing, upgrading, and installing software/applications/packages, by the use of a single command. Also, winget commands are straightforward and uncomplicated. Get started with this amazing tool by going through this article. Let’s know if you face any problems.