
- The package manager contacts one or more repositories (maintained by the OS vendor, third parties, or the open-source community) to fetch packages and metadata.
- When you request an install, the manager checks dependency metadata and installs any required packages automatically.
- It may run configuration or post-install scripts to integrate the software with system services.
- From fetching packages to resolving dependencies and running configuration tasks, the package manager automates the full software lifecycle.
First up: apt (Advanced Package Tool)
- Used on Debian-based systems (including Ubuntu).
- Works with
.debpackages and maintains a package index for fast lookups. - Common commands:
- Update package index:
sudo apt update - Install a package:
sudo apt install package_name - Remove a package:
sudo apt remove package_name - Upgrade installed packages:
sudo apt upgrade - Search packages:
sudo apt-cache search package_name
- Update package index:

- Common on Red Hat–based distributions (RHEL, CentOS, older Fedora). Newer Fedora and RHEL/CentOS versions use DNF (
dnf) which is largely compatible with YUM commands. - Works with RPM packages and resolves dependencies automatically.
- Common commands:
- Update packages and metadata:
sudo yum update(orsudo dnf update) - Install a package:
sudo yum install package_name(orsudo dnf install package_name) - Remove a package:
sudo yum remove package_name - Search for a package:
sudo yum search package_name
- Update packages and metadata:

- Popular on macOS and also available on Linux as
brew. - Installs into a user-writable prefix (for example
/usr/localon Intel macs or/opt/homebrewon Apple Silicon), so most installs do not requiresudo. - Common commands:
- Update Homebrew:
brew update - Install a package:
brew install nginx - Uninstall a package:
brew uninstall package_name - Search packages:
brew search package_name
- Update Homebrew:

- Command-line package manager for Windows that wraps installers and handles dependency scripts.
- Common commands:
- Install a package:
choco install package_name - Uninstall a package:
choco uninstall package_name
- Install a package:
Note:
sudo apt update refreshes the package index and does not accept -y. To automatically accept prompts on Debian/Ubuntu, use -y with apt install or apt upgrade (for example, sudo apt install -y nginx). Similarly, use the auto-confirm flags for other package managers when performing non-interactive installs (e.g., -y for yum, dnf, and choco).- Replace
package_namewith the package you want (for our purpose:nginx).
- Always prefer your platform’s package manager to install NGINX (or other software). Package managers handle dependency resolution, updates, and clean removal in a consistent way.
- Next: a demo that shows step-by-step installation and basic configuration of NGINX using the package manager appropriate for your OS.
- NGINX: Official Download and Installation Guides
- APT Guide (Debian/Ubuntu)
- DNF Documentation (Fedora)
- Homebrew Documentation
- Chocolatey Documentation