6

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?

6

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

  • Thanx @karel for editing my solution with details :) – minigeek Sep 27 '16 at 7:16
  • how can i find my correct architecture? – bha159 Sep 27 '16 at 13:54
  • @ratcoder type lsb_release -a in the terminal. – WinEunuuchs2Unix Oct 8 '17 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.