Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 670
Obinna Kalu Avatar asked Jul 13 '17 04:07

Obinna Kalu


1 Answers

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\

like image 81
Jeroen Wiert Pluimers Avatar answered Sep 20 '22 05:09

Jeroen Wiert Pluimers