• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / Solve E: Unable To Locate Package Error On Ubuntu

Solve E: Unable To Locate Package Error On Ubuntu

By Sourabh / November 20, 2019 Category: How To, Ubuntu

How to solve E: unable to locate package error on Ubuntu desktop. The most common reason for this is that your /etc/apt/sources.list is missing or it is corrupted. You can run the following commands to add the four main repositories:


sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse

Now update the system:


sudo apt-get update
sudo apt-get upgrade

Once you have executed the commands add security and update repositories using the following commands – the following set of commands are for Ubuntu 18.04 LTS. Similarly you can replace the version name and run the commands for different Ubuntu version:


sudo -- sh -c "echo 'deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse main restricted universe' >> /etc/apt/sources.list"
sudo -- sh -c "echo 'deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse main restricted universe' >> /etc/apt/sources.list"
sudo -- sh -c "echo 'deb http://archive.ubuntu.com/ubuntu bionic-backports multiverse main restricted universe' >> /etc/apt/sources.list"

When the above commands are executed, the /etc/apt/sources.list should look as – use the command “cat /etc/apt/sources.list” to view the content:


deb http://archive.ubuntu.com/ubuntu bionic main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-backports multiverse main restricted universe

Now update the system:


sudo apt-get update
sudo apt-get upgrade

Some times you are “Unable to locate package” while installing packages with apt or apt-get commands. To fix these, open software-properties-gtk. Run the following command:


software-properties-gtk

Must for Update

  1. Open the “Ubuntu Software” tab.
  2. Ensure that the first 4 check boxes on this tab are enabled:
  3. The Updates tab is where you set when and how Ubuntu receives security updates.
  4. Make sure you select it and click on the Close button.
  5. When prompted click on the “Reload” button:
  6. The system will update cache
  7. Update the system and install packages

Once updated you are ready to install or update your system using the apt-get command or apt command:


sudo apt-get update
sudo apt-get upgrade

Primary Sidebar

Latest Posts

Downlaod Ubuntu 26.10 Stonking Stingray

How To Shutdown Linux With A 15 Minute Delay And Message

Using Linux Terminal How To Get Total Disk Size In GB

Count And Find Number Of Files In A Linux Directory Using Command

Check How Many Users Are Created In Linux Ubuntu

How To Check User Permissions In Linux Using Command

Check Which Folder Is Taking More Space In Ubuntu Linux

How to Install Claude Desktop App in Ubuntu Linux

Job Scheduling Using At Command In Linux With Examples

How To Check Permissions Of A Directory In Linux Command

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap