• 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

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

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

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