Syed Jahanzaib Personal Blog to Share Knowledge !

October 9, 2013

Ubuntu apt-get not working


Salam Alaekum,

If you are having trouble using apt-get in Ubuntu 12.4  As showed in the image below . . .

1- apt

then try below solutions …

Solution # 1  (Updated 5th-NOV-2021]

Edit the existing apt source file

nano /etc/apt/sources.list

Remove all entries & use paste below

deb precise main restricted
deb-src precise main restricted
deb precise-updates main restricted
deb-src precise-updates main restricted
deb precise universe
deb-src precise universe
deb precise-updates universe
deb-src precise-updates universe
deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse
deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse
deb precise-security main restricted
deb-src precise-security main restricted
deb precise-security universe
deb-src precise-security universe
deb precise-security multiverse
deb-src precise-security multiverse

Save & Exit & update

apt-get update

Solution # 2

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get dist-upgrade
sudo apt-get update --fix-missing
sudo apt-get update

Solution # 3

Run below cmd

sudo sed -i -e 's/\|' /etc/apt/sources.list

& try to update now

 apt-get update 

Hopefully the issue will be solved : )

As shown in the image below . . .

2- apt


Syed Jahanzaib


%d bloggers like this: