• 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

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

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

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