DPKG – How to Recover Lost or Deleted Package Manager for Debian

aptdpkginstallation

OS: Ubuntu 12.04

Accidentally deleted dpkg. Now, packages can't be installed. So, needs an dpkg installer which installs packages.

Best Answer

Download the dpkg package for your release from https://launchpad.net/ubuntu/+source/dpkg/.

Extract the file.

cd to the root of the dpkg source directory.

./configure
make
sudo make install

You may need to download some packages if ./configure fails

Related Question