Install apt package in ubuntu 12.04

I have mistakenly removed the default package APT from my system .

When I run command locate apt-get, I get below output:

/home/jeet/apt-get
/home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/cmdline/apt-get.cc
/home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/apt-get.8.xml
/home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/de/apt-get.de.8
/home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/fr/apt-get.fr.8
/home/jeet/Desktop/apt/apt-0.7.25.3ubuntu9.13/doc/ja/apt-get.ja.8
/home/jeet/Downloads/apt-get
/home/jeet/Downloads/apt-get.8.gz
/usr/share/bash-completion/completions/apt-get
/usr/share/bash-completion/completions/slapt-get

If I run ls | grep apt-get, then I won't get any output.

Can anybody please advice how to recover apt package or install it from start?


You can download the apt .deb package, depending on your system, from the following locations. Once downloaded, open a terminal(Ctrl-Alt-t) and run the appropriate commands indicated below.

Downloading apt for 12.04:

The 32-bit version of apt can be downloaded here.

To install:

sudo dpkg -i apt_0.8.16~exp12ubuntu10.10_i386.deb

For the 64-bit version: download here

To install:

sudo dpkg -i apt_0.8.16~exp12ubuntu10.10_amd64.deb

Downloading apt for 12.10:

The 32-bit version of apt can be downloaded here.

To install:

sudo dpkg -i apt_0.9.7.5ubuntu5.4_i386.deb

For the 64-bit version: download here.

To install:

sudo dpkg -i apt_0.9.7.5ubuntu5.4_amd64.deb

You can install it from Ubuntu Software Center.

Enter apt in the search box, it should come-up as the first option, simply install it.