3

When trying to deal with an error I accidentally deleted the /usr/bin/dpkg file and now I can't install packages anymore.

I'm still pretty new to linux so I'm not sure what I'm doing. Please help.

I use 20.04.2 LTS

1 Answers1

5

You have to manually download its package and get executable from it by

cd ~/Download
wget http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.19.7ubuntu3_amd64.deb
ar x dpkg_1.19.7ubuntu3_amd64.deb
tar -xf data.tar.xz
sudo cp usr/bin/dpkg /usr/bin/dpkg

And then reinstall it for sure by sudo apt-get install --reinstall dpkg .

N0rbert
  • 103,263