Quick answer: run sudo apt update, check your sources with cat /etc/apt/sources.list, enable the right component (universe/contrib/multiverse), then verify the package name with apt-cache search.
What's actually happening here is that apt never queried the internet for your package. It looked at its local cache of package indexes in /var/lib/apt/lists/, found nothing matching the name you typed, and gave up. The message is literal — apt has no idea what you're talking about because nothing in its current view of the world mentions that package. Common real-world triggers: a fresh Docker ubuntu:22.04 image before you run apt update, a Kali container missing the kali-rolling repo, or someone typing pip3 install python3-pip on a Debian box.
Nine times out of ten it's one of four things: stale indexes, a disabled repo component, a wrong package name, or a package that only exists in a repo you haven't added yet. Work through these in order.
Fix steps
-
Refresh the package indexes. This is the single most common cause, especially on fresh VMs, Docker images, and WSL installs.
sudo apt updateIf you see errors here about failed connections or GPG signatures, stop and fix those first — the rest of this article assumes
apt updatecompletes cleanly. -
Confirm the exact package name. Debian and Ubuntu names are not the same as the binary or the upstream project.
apt-cache searchqueries the local index by regex:apt-cache search openssh apt-cache search --names-only '^python3-pip$' apt search ripgrepIf nothing shows up, the package genuinely isn't in your configured repos. Don't guess at variants like
openssh-server-dev— search. -
Check which repositories you actually have. On Ubuntu 22.04+ the sources are split between
/etc/apt/sources.listand the.sourcesfiles in/etc/apt/sources.list.d/. On Debian 12, the modern format is deb822 under/etc/apt/sources.list.d/debian.sources.cat /etc/apt/sources.list ls /etc/apt/sources.list.d/ grep -rE '^deb ' /etc/apt/sources.list /etc/apt/sources.list.d/On Kali, you should see exactly one repo line pointing at
http://http.kali.org/kaliwith themain contrib non-free non-free-firmwarecomponents. If a Kali install shows Debian's repos, someone installed the wrong base image and you'll chase phantoms for hours. -
Enable the missing component. On Ubuntu, packages like
build-essentiallive inmain, butzshextras,ffmpeg, and lots of fonts live inuniverse. A minimal cloud image usually has onlymainenabled. Edit the sources and add it:sudo add-apt-repository universe sudo add-apt-repository multiverse sudo add-apt-repository restricted sudo apt updateOn Debian,
contribandnon-freearen't enabled by default — add them to theComponents:line indebian.sourcesif you need firmware or codecs. -
Add a third-party repo if the package came from upstream. Docker, Node.js, PostgreSQL, and Google Chrome all maintain their own apt repos. Installing
docker-cefrom Ubuntu's universe will fail because Canonical doesn't ship it. Follow the vendor's keyring + sources setup, then re-runapt update. -
Verify the architecture matches. If you're on arm64 (Raspberry Pi, Apple Silicon VM, Graviton instance), some packages are amd64-only and won't appear in the index at all.
dpkg --print-architecture uname -mAn
amd64package on anarm64host produces exactly this error with no mention of architecture, which is genuinely misleading.
If the package still won't show up
- Clear a corrupted index. If
apt updatehalf-succeeded after a network drop, the lists can be inconsistent:
sudo rm -rf /var/lib/apt/lists/*
sudo apt clean
sudo apt update
- Check for held or pinned packages that might be masking the name in search output:
apt-mark showhold
cat /etc/apt/preferences.d/* 2>/dev/null
- On WSL, the default Ubuntu image ships without
universeand with a stale mirror. Runsudo apt updatefirst, then re-check. If DNS is broken in WSL, apt silently can't reacharchive.ubuntu.com—cat /etc/resolv.confshould show a nameserver, not an empty file. - Grab the .deb directly. As a last resort, download from packages.debian.org or packages.ubuntu.com and install with
sudo apt install ./file.deb. The./prefix matters — without it apt treats the argument as a package name and you're back to the same error.
Prevention
Run sudo apt update before every install session, not after. Keep your container base images pinned to a tag you've actually tested, and when you write a Dockerfile, put apt-get update && apt-get install -y pkg on the same RUN line — splitting them bakes a stale index into the layer cache and produces this exact error months later when someone builds without --no-cache. On your workstation, periodically run apt list --upgradable so you notice repo problems while they're still small.