I just recently noticed my apt-get system is broken. I have tried everything I can to fix it but everything I'm told just ends up with a message saying that the apt-get system is corrupt and unfixable. When I try to install a package, it says it can't find it. How can I completely reinstall apt-get? Is there even such a thing?
Asked
Active
Viewed 318 times
3
-
1could you please do a sudo apt-get update and copy paste the result – albertoefg Dec 22 '15 at 04:07
-
What is your Ubuntu architecture? amd64 or i386? – Tung Tran Dec 22 '15 at 04:32
1 Answers
3
You can download apt packages from Ubuntu repos and install them manually.
At first, create a directory in ~/Downloads
and go into it:
mkdir ~/Downloads/apt-packs
cd ~/Downloads/apt-packs
And then download all apt packages corresponding to your architecture (amd64 or i386). For example, you have amd64 (Ubuntu 64bit):
Download following deb packages for apt (apt and its dependencies):
wget http://archive.ubuntu.com/ubuntu/pool/main/a/apt/libapt-inst2.0_1.1.5_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg5.0_1.1.5_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/a/apt/apt-utils_1.1.5_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.1.5_amd64.deb
Finally, install them all with dpkg
:
sudo dpkg -i *.deb

Tung Tran
- 3,945
-
-
@YuJiaao yes that was the version I provided at that time. Now you can use the latest version. – Tung Tran Dec 25 '17 at 01:17