52

I installed Android SDK and it's taking almost 7 GB on my (relatively small) SSD.

When I open Android SDK Manager I can see that everything is installed even older API versions.

enter image description here

Same thing for the Extras:

enter image description here

Can I safely un-install all the versions and only keep the latest one (API 17 in my case) ?

I use Andoid SDK Tools to develop Android Apps with eclipse.

Thank you.

Majid Laissi
  • 19,188
  • 19
  • 68
  • 105
  • 1
    You may still want to retain some of the older SDK's so as to try your apps on lower platform. I personally keep GB(API 10), ICS(API 14) and JB(API 17). – Master Chief Mar 03 '13 at 05:42
  • 1
    Also what you can try is just move the whole android SDK folder to a new location with relatively large storage, and then specify the new path in preferences in eclipse. Will save you some bandwidth, in case you later need those API's. My friend just copies from mine. Data here is very costly :( – Master Chief Mar 03 '13 at 05:45
  • Thank you very much.. so if i keep only API 17 i will not be able to delpoy to old devices ? – Majid Laissi Mar 03 '13 at 14:04
  • 1
    You can deploy it, but you would have to mention it(that you want to run on lower APIs) on your manifest file. Also any API above the targeted device will not run and will interfere with your app design. Search for android TargetSDK version and MinimunSDK version. – Master Chief Mar 03 '13 at 14:15
  • thank you. If you post this as an answer i will accept it – Majid Laissi Mar 03 '13 at 14:34

5 Answers5

25

Just delete the packages you want to uninstall.

You may still want to retain some of the older SDK's so as to try your apps on lower platform. I personally keep GB(API 10), ICS(API 14) and JB(API 17).

Also what you can try is just move the whole android SDK folder to a new location with relatively large storage, and then specify the new path in preferences in eclipse. Will save you some bandwidth, in case you later need those API's. My friend just copies from mine. Data here is very costly :(

You can deploy it, but you would have to mention it(that you want to run on lower APIs) on your manifest file. Also any API above the targeted device will not run and will interfere with your app design. Search for android TargetSDK version and MinimunSDK version.

Master Chief
  • 2,520
  • 19
  • 28
  • Is this possible with Android Studio too? Also, are you still using Eclipse ADT? – Pacerier Jul 01 '15 at 05:05
  • So those older SDKs are only needed for local emulator to run older APIs to test your app? They are not needed to build or deploy your app for older APIs, correct? – Redoman Aug 18 '15 at 01:18
24

As for the current version (Feb 2019) here is way that works from within Android Studio:

  1. Open the SDK Manager (Tools -> SDK Manager).

  2. There you see all available platforms and in "Name" a box which shows Installed [✓], Update available [–] and Not installed [  ] platforms.

enter image description here

  1. If you klick on that box you can change the status. Click until it is empty and a red x shows up. Then press Apply. The platform will be uninstalled then.

enter image description here

Pauloco
  • 1,049
  • 1
  • 10
  • 19
  • 5
    I had to "show package details" 1st - as I only had the SDKs, then I could remove – Jon Aug 25 '20 at 13:39
18

Select the packages that you want to uninstallenter image description here and click delete packages button.

Skanda
  • 872
  • 13
  • 21
  • 5
    thank you for the reply, I know how to uninstall them, the question is, are they required or not .. can I remove them safely. – Majid Laissi Mar 03 '13 at 14:01
  • 1
    Now the deletion of SDKs can be done in Settings > Appearance & Behaviour > System Settings > Android SDK. Click to see each SDK details. Unmark checkbox and click in Apply. – Topera Mar 05 '17 at 10:24
6

If you want to use the android command line tool sdkmanager to do this instead of the UI, this is the way to do it.

Prepare

Make sure that sdkmanager doesn't complain about repositories.cfg missing:

mkdir -p ~/.android && touch ~/.android/repositories.cfg

Also make sure that you are using Java 8 by calling java -version, otherwise sdkmanager won't work (as of time of writing). Using Java 8 can be solved in many different ways, e.g:

  • Linux: sudo update-alternatives --config java
  • macOS using SDKMAN!: sdk use java <VERSION>
  • Other way

Use

For help with all the commands run sdkmanager --help

For listing available components:

sdkmanager --list

For installing a component:

sdkmanager --install "build-tools;28.0.3"

For uninstalling a component:

sdkmanager --uninstall "build-tools;26.0.2"
Erik Živković
  • 4,867
  • 2
  • 35
  • 53
1

Uninstalling Android SDK from Visual Studio Installer and then installing it again did resolve my problem and made the Android SDK options enable for me.

Goto VS Installer, go down to the SDK portion and uncheck Java SE Development Kit (version) and Android SDK setup (API level 25) from the individual component options and click on modify.

When they're gone, install them again following the same steps.

Image to get the hint

Iqra.
  • 685
  • 1
  • 7
  • 18