Learn Understand first, then practice while the concept is still fresh.

M37 - Package Management: CLI

Use command-line package managers to search, install, update, and remove software more consistently and with better automation potential.

Software

Package Management: CLI

Use command-line package managers to search, install, update, and remove software more consistently and with better automation potential.

40 min INTERMEDIATE BOTH Curriculum-reviewed
What you should be able to do after this
  • Search for software from the CLI.
  • Install, update, and remove software through the package manager.
  • Explain why CLI package management is useful for repeatability and automation.

Why This Matters

The CLI package workflow is valuable because it is:

  • faster for repeated tasks
  • easier to document
  • easier to automate
  • clearer about what was installed and how

But speed should not turn into carelessness.


1. Search First

Before installing, confirm the package name and source as clearly as you can.

Search with winget

winget search Python

Search with apt

apt search python3

This helps reduce mistakes such as choosing the wrong package or assuming a package name that does not exist.


2. Understand Update Versus Install

On Linux in particular, updating package metadata and installing software are not the same step.

Install and Upgrade with winget

winget install Git.Git winget upgrade —all

Metadata and Install with apt

sudo apt update sudo apt install git sudo apt upgrade

That distinction matters because good package habits depend on knowing what each command is actually doing.


3. Removal Is Also Part of Management

A package manager is not only for installation.

It also gives you a more structured way to remove software later.

That matters because clean removal is part of system maintenance, not an afterthought.

Better Habit

Search first, install deliberately, update through the same system, and remove through the same system. That is a healthier software-management loop than one-off installers scattered across the machine.


What to Ignore for Now

  • third-party package feed management in depth
  • package pinning and version locks
  • advanced dependency debugging

The goal here is a clean day-to-day package workflow.


Before You Move On

You are ready for the software lab when you can:

  1. search for a package
  2. explain update versus install
  3. explain why CLI package tools are better for repeatable setup

Next, we use that workflow to build a small toolkit in a more deliberate way.