Obinna Kalu
Obinna Kalu

Reputation: 708

How to safely remove/uninstall Android Virtual Device .img files added by Visual Studio Emulator for Android

When the Microsoft Visual Studio 2017 product is installed and the Cross-Platform Mobile Development workload is selected, it adds the Visual Studio Emulator for Android component, including a set of Android Virtual Devices (avd) folders (e.g. c:\Users\loginname\.android\avd\VisualStudio_android-23_arm_phone.avd), containing some pretty large .img files. However, upon removing/uninstalling the "Visual Studio Emulator for Android" component from the product, it does not remove the AVDs and .img files. These are still left intact and consuming over 10GB of disk-space. So, question is how does one safely remove/uninstall the Android Virtual Device .img files without breaking something. Is directly deleting them from the file-system, a safe option? Unfortunately, it does not appear on the Windows Control Panel's 'Add/Remove Programs' list. Thankful for any directions/possible suggestions.

Upvotes: 6

Views: 9226

Answers (2)

Jeroen Wiert Pluimers
Jeroen Wiert Pluimers

Reputation: 24513

Since after uninstalling the "Visual Studio Emulator for Android" component, you cannot get to the "AVD Manager" any more, you have to manually delete this directory:

%LocalAppData%\Microsoft\VisualStudioEmulator

This works for both Visual Studio 2017 and Visual Studio 2015.

In addition, you might want to run "AppWiz.cpl", then remove "Android SDK Tools", which is also not automatically removed by the Visual Studio installer (at least not in Visual Studio 2015).

This will get rid of the multi-gigabyte folder %ProgramFiles(x86)%\Android\android-sdk\

Upvotes: 4

Arnold H
Arnold H

Reputation: 51

  1. Step 1.

--> Click Tools.

  1. Step 2.

-->Choose android (from the drop down menu).

  1. Step 3.

-->Choose AVD Manager

  1. Step 4.

-->Delete Virtual device by selecting the drop down icon (At the 'action' tab column).

  1. Step 5.

Hope it helps :)

Upvotes: 5

Related Questions