apt can't find the package in any configured repository. Ninety percent of cases are: stale indexes, the package lives in universe/multiverse (not enabled), or a typo.
apt update refreshes the lists; on fresh systems the cache may be empty/minimal. Always the first command: sudo apt update.
Some packages live in non-main components; on minimal images those repos may be off. apt policy / apt-cache policy <name> shows candidate versions; check the package exists for YOUR release.
apt search <part> finds real names (e.g. php-xml vs php7.4-xml across releases).
sudo apt update && sudo apt install <pkg>
apt search <partial-name> 2>/dev/null | head ; apt-cache policy <pkg>
sudo add-apt-repository universe && sudo apt update # then retry the install
cat /etc/apt/sources.list 2>/dev/null | grep -v '^#' | head ; ls /etc/apt/sources.list.d/
Ubuntu package availability differs by release — a package existing for 22.04 doesn't guarantee 24.04 (and vice versa). packages.ubuntu.com is the source of truth. Debian: similar trap with main vs contrib/non-free-firmware components.
Check the package exists for your exact release (packages.ubuntu.com / packages.debian.org), including the component (universe/contrib). If it's genuinely absent, use the upstream repo, backports, or a container image that ships it.
Prefer official sources; PPAs carry both trust and lifecycle costs. If you must, pin them explicitly and keep the least scope (single repo, signed).
Our most-documented failures, packaged as ready-to-ship starter kits: Docker, Kubernetes, and Terraform.
Browse the template store →One-time. Yours to modify. Instant download from the NinjaOps template store.