12

I tried to install Android Studio and it ended up taking up all of my free disk space. How do I uninstall it? The application reports it uses 400MB and /user/me/Library/Android directory reports 8GB. Can I delete these two directories? I would like to try and start fresh.

I'm on Mac OSX Mavericks.

Update:
I was following the instructions here,

enter image description here

This says, "Android Studio provides everything you need to start developing apps for Android".

The next page says, "By default, the Android SDK does not include everything you need to start developing." WTF? Which one is it?

enter image description here

So following the instructions on that page it says add these items: enter image description here

I selected the items it recommended and noticed some items it mentions where already installed while others were not (the icon on the far right of it's name).

I clicked the minimal amount to install and clicked next. Half way through the download I start getting Low disk space warnings. Next I get Android out of space errors. So I cancel and look back at the application directory and that's at 400MB. I then remember from somewhere that it said something would be installed in /Library/Android. I check that directory and it's 7.4GB.

1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
  • 2
    Operating system? Maybe http://stackoverflow.com/questions/17625622/how-to-completely-uninstall-android-studio will help if OS X. – stkent Jan 02 '15 at 02:52
  • 5
    Moderators: What is wrong with this question? "...software is off-topic for Stack Overflow unless they directly involve tools used primarily for programming" - Android Studio and the Android SDK are tools for programming. – 1.21 gigawatts Jan 02 '15 at 18:46
  • 1
    @1.21gigawatts You're right, it's allowed via Q&A restrictions. I understand it was closed because the question itself did not involve programming, although the tool is used for it. However, the moderators closing this question should have said that! –  Apr 14 '16 at 02:30
  • 1
    @1.21gigawatts This question is _probably_ a dupe of the one stkent links, but, um, let's say it's _strange_ that that one is _protected_ and yours would be closed as off-topic. I've voted to reopen, if only to have it closed for the right reasons. – ruffin Feb 23 '19 at 13:53
  • @ruffin "protected" is just a measure to prevent people with a reputation of 10 or less from posting answers. – Mark Rotteveel Feb 24 '19 at 09:29
  • @MarkRotteveel -- Exactly my point! _This_ question was closed as off-topic, but the _other_ was "so on topic" & popular that it got a protected flag. ;^D Glad to see it's open again. – ruffin Feb 24 '19 at 19:34

2 Answers2

8

Most likely, you can just prune the sdk directories.

On Mac OSX Yosemite, my android sdk folder was taking 18 GB two minutes ago. Now, it's just 3.19 GB (not including Android Studio), after having deleted the packages I'm not currently using.

From Android Studio, select Tools > Android > SDK Manager.

Keep the tools. Keep the latest android sdk (currently at api level 21). That means, inside the folder api level 21; keep "SDK Platform", keep the "x86 emulator image for 64 bit", delete the "intel x86 emulator image for 32 bit", keep the "Samples for SDK", keep "Documentation for Android SDK", and keep "Sources for Android SDK"

For the "Google APIs", only keep that if you plan to use the google maps api, or some other google apis. Most likely, you can just delete that one as well, and download it again should you ever need it.

But do delete the package for "ARM emulator image" and all the other packages for the other api levels. Android is backwards-compatible, so targeting the latest SDK does not require additional SDKs even if your minimum SDK is very low.

From the extra folder section: Keep the "Intel x86 Accelerator (HAXM installer)", keep the "Android support repository" and keep the "Android support library". You can delete the "Google Repository" (although, I've personally kept that one, so you'll probably end up with even less than 3.19 GB once you delete it).

And if you still need even more space, I guess you could even remove the "SDK Samples" and the "Sources of Android SDK" (not that I'd recommend doing that. Do it only if you really need the space). After all, if Windows Phone and iPhone developers can survive without having access to the source code of their platforms, there is no reason most of us couldn't survive without the source code to our platform either.

Stephan Branczyk
  • 9,363
  • 2
  • 33
  • 49
  • I've updated the post with more information. I'm going to try again later today. Can I safely ignore this page, http://developer.android.com/sdk/installing/adding-packages.html. It's the second page of the Android Studio setup process. – 1.21 gigawatts Jan 02 '15 at 18:49
  • No, you can use that page if you wish. Just ignore the bit about the ARM emulator. No developer in their right mind uses the ARM emulator anymore. And ignore the bit about "Google Play Services", unless you need it. Also, notice that they say to get the latest packages, but they don't say anything about deleting the old ones from the previous SDKs. Definitely delete the old ones. By default, the initial download comes with one set of SDKs already included, it's just that those SDKs are very likely to be too old already. It's best to get the latest SDKs, and just delete the old ones. – Stephan Branczyk Jan 03 '15 at 03:43
3

I'm assuming you're using OS X here. You can simply open the applications folder and move Android Studio to the trash. Same thing goes for the SDK.

Though, I'm not sure why it says it's taking up 8 gb - it isn't nearly that big for me. My Android Studio is ~500 mb

EDIT: Also see @stkent's great find in the comments - he linked you to How to completely uninstall Android Studio?, which provides an answer that will completely remove all traces, so that if you reinstall, it is completely fresh.

Community
  • 1
  • 1
Alex K
  • 8,269
  • 9
  • 39
  • 57
  • 2
    ~/Library/Android is apparently where the SDK is stored by default as of Android Studio 1.0. – stkent Jan 02 '15 at 03:07