Running sudo apt install <package-name> in Ubuntu should query local repository indexes, resolve dependencies, and unpack the requested software. However, encountering the terminal error “E: Unable to locate package [package-name]” halts software deployment. This error indicates that the Advanced Package Tool (APT) cannot find an entry matching your query inside its cached package database. This failure occurs when local APT cache lists are outdated, software resides inside un-enabled official repositories (such as Universe or Multiverse), the package was superseded or renamed, or the software is packaged exclusively via Snap or third-party PPAs.
Update the Local APT Package Index Cache
Fresh Ubuntu installations or newly deployed virtual machines possess empty or outdated package lists until an explicit repository synchronization is executed.
- Open a terminal window (press Ctrl + Alt + T).
- Update your local package lists from upstream Ubuntu mirrors:
sudo apt update - Wait for the process to complete. APT will query all enabled repositories and reconstruct its internal SQLite index cache.
- Attempt to install the package again:
sudo apt install <package-name>
Enable the Universe, Multiverse, and Restricted Repositories
Ubuntu divides its software library into four primary components: Main (canonical supported free software), Universe (community maintained open source), Restricted (proprietary drivers), and Multiverse (software restricted by copyright or legal issues). Many popular tools reside in Universe or Multiverse.
- Enable the community-maintained Universe repository:
sudo add-apt-repository universe - Enable the Multiverse repository:
sudo add-apt-repository multiverse - Enable the Restricted repository:
sudo add-apt-repository restricted - Refresh your package cache:
sudo apt update - Try installing your desired utility again.
Search for the Correct Package Name Using ‘apt-cache’
Linux package names are strictly case-sensitive and often differ slightly from common application branding (e.g. build-essential instead of buildessential, or vlc-bin instead of VLC).
- Search the repository database using
apt-cache:apt-cache search <keyword> - For an exact name match search, run:
apt-cache pkgnames | grep -i <keyword> - Review the output list to locate the precise package name.
- Install using the exact string reported in the terminal.
Check for Snap or Flatpak Packages
In modern Ubuntu releases, Canonical distributes certain desktop applications (such as Chromium, Spotify, and Discord) exclusively through Snap packages rather than traditional APT archives.
- Search the Snap store:
snap search <application-name> - If the application is available via Snap, install it using:
sudo snap install <application-name>
Verify Architecture Compatibility (32-Bit vs 64-Bit)
If you are attempting to install legacy packages or 32-bit compatibility libraries (such as Steam or Wine dependencies), 64-bit Ubuntu systems require multiarch support.
- Enable the 32-bit (i386) architecture on your system:
sudo dpkg --add-architecture i386 sudo apt update - Install the package with the architecture qualifier appended:
sudo apt install package-name:i386