Package Management Commands
Common Homebrew, APT, DNF, YUM, and package-manager operations.
Version and safety scope
Last reviewed: July 11, 2026
This is a general command reference, not a version-pinned runbook. Check the installed version, current official documentation, and the target account, host, and path before use. Commands that deploy, destroy, delete, prune, sync, upgrade, or change system settings can cause cost, downtime, or data loss; preview changes and back up where appropriate.
Homebrew
brew update
brew install git node hugo
brew install --cask visual-studio-code
brew list
brew outdated
brew upgrade
brew cleanupUse brew outdated before broad upgrades on machines used for active development.
APT
sudo apt update
sudo apt upgrade
sudo apt install git curl wget vim
apt list --installed
apt list --upgradable
sudo apt autoremoveFor production hosts, review upgrade scope before applying kernel or runtime updates.
DNF and YUM
sudo dnf check-update
sudo dnf install git nginx
sudo dnf upgrade
sudo yum check-update
sudo yum install git nginx
sudo yum updateUse the package manager native to the distribution so service scripts and dependencies remain consistent.