APT – How to Get apt Back After Uninstalling It

aptwindows 10windows-subsystem-for-linux

I was just experimenting on bash supported by Windows 10. I entered the command sudo apt-get remove apt. I was greeted by a warning message, "it's dangerous bla bla", but I decided to see how far I could take it and I input the text message to proceed, and so I uninstalled apt.

Now how can I get APT back? Do I have to uninstall and then reinstall bash support on Windows? If so, how can I do that?

Best Answer

Download the correct apt package for your Ubuntu version by searching for it here

Open Bash for Windows 10 and run the following command to show your Ubuntu release:

lsb_release -a

The current release of Bash for Windows 10 is 14.04 out of the box, but you can upgrade it. This is the release of apt that you need to download. Bash on Windows 10 only can be installed on a 64-bit version of Windows 10 Anniversary Update build 14393 or later, so you need to download the amd64 apt file.

Install apt using dpkg

sudo dpkg -i apt_1.0.1ubuntu2.13_amd64.deb  

The above command is if lsb_release -a returned Ubuntu 14.04 and for amd64 architecture to match your Windows architecture.

enter image description here
Click amd64 to download apt

Related Question