Android SDK Uninstall Guide

Android Studio
android-sdk-uninstall-guide
Source: Macpaw.com

Introduction

Android SDK is a crucial tool for developers working on Android applications. However, there may be instances where you need to uninstall the Android SDK, either because you are upgrading to a newer version or because you no longer need it. Uninstalling the Android SDK can be a bit complex, especially if you are not familiar with the underlying directories and files. This guide will walk you through the steps to completely uninstall the Android SDK from both Windows and Mac operating systems.

Uninstalling Android SDK on Windows

Step 1: Uninstalling through Control Panel

To start the uninstallation process, you need to access the Control Panel on your Windows machine. Here’s how you can do it:

  1. Open Control Panel: Search for it in the Start menu or navigate to it through the Start menu > Settings > Control Panel.
  2. Uninstall a Program: Click on the option labeled "Uninstall a Program." This will take you to a list of all the programs installed on your system.
  3. Find Android Studio: Scroll through the list of programs until you find "Android Studio." Click on it to select it for uninstallation.
  4. Confirm Uninstallation: A confirmation dialog box will appear asking if you are sure you want to uninstall Android Studio. Click "Yes" to proceed.
  5. Uninstalling Additional Components: By default, Android Studio will also include options to uninstall additional components such as the Android Virtual Devices (AVDs) and the Android SDK caches. Make sure these options are checked if you want a complete uninstallation.

After clicking on "Next," you will be prompted to confirm the uninstallation of these additional components. Select them and then click on "Uninstall" to begin the process.

Step 2: Remove Android SDK Files

Even after uninstalling through the Control Panel, there may be some residual files and directories left behind that need to be manually deleted. Here’s how you can do it:

  1. Access User Folder: Open your user folder in the file manager. The path is typically C:\Users\Your_UserName, but you can also search for %USERPROFILE% in the Start menu and press Enter to reach there.
  2. Delete Specific Folders: In this directory, delete the following folders:
    • .android
    • .AndroidStudio (and any analogous directories with versions on the end, i.e., AndroidStudio1.2)
    • .gradle
    • .m2
  3. Delete JetBrains Folder: Go to %APPDATA% and delete the JetBrains folder.
  4. Delete Android Folder: Navigate to C:\Program Files and delete the Android folder.
  5. Delete SDK Folder: Finally, go to %LOCALAPPDATA% and delete the Android folder.

Additional Steps for Complete Removal

To ensure that all remnants of the SDK are removed, you should also check for any other related directories or files in your system. Here are some additional steps:

  1. Check Hidden Files: Sometimes, these folders might be hidden by default. To make them visible, go to the View tab in the file explorer and check the option for "Hidden items."
  2. Delete Remaining Folders: Look for any remaining folders related to the SDK in your user directory or other system directories and delete them.
  3. Verify SDK Manager: If you have installed the SDK Manager as part of your Android development setup, you should also uninstall it using the same steps as above.

Uninstalling Android SDK on Mac

Uninstalling Android SDK on a Mac involves a few more steps compared to Windows, but it is still manageable with the right instructions.

Step 1: Quit Android Studio

Before you begin the uninstallation process, ensure that Android Studio is not running. Here’s how you can do it:

  1. Check Dock Icon: Look for the Android Studio icon in the Dock. If there is a dot underneath the icon, it means the application is open.
  2. Quit Application: Right-click on the app icon in the Dock and select "Quit" from the dropdown menu.
  3. Force Quit: If the application is unresponsive, you may need to force quit it. Open Activity Monitor by searching for it in Spotlight or by navigating to Applications > Utilities > Activity Monitor. Locate any processes related to Android Studio and select them. Click the "X" button at the top to quit the process.

Step 2: Remove the Android Studio App

With Android Studio closed, you can now remove the application itself:

  1. Access Finder: Open Finder from the Dock.
  2. Navigate to Applications: Find and click on the "Applications" folder in the sidebar.
  3. Remove Android Studio: Scroll through the list of applications until you find "Android Studio." Right-click (or control-click) on it and select "Move to Trash."
  4. Empty Trash: Empty the Trash to remove the Android SDK permanently. You may be prompted to confirm this action.

Step 3: Delete Android Studio-Related Files and Folders

After uninstalling the Android Studio app, it’s essential to delete any remaining files and folders:

  1. Access Hidden Library Folders: In Finder, click on "Go" in the menu bar, press and hold the Option key, and select "Library."
  2. Navigate to Preferences Folder: Navigate to ~/Library/Preferences/ and look for any folders or files related to the Android SDK. Move them to the Trash.
  3. Navigate to Application Support Folder: Navigate to ~/Library/Application Support/ and look for any folders or files related to the Android SDK. Move them to the Trash.
  4. Navigate to Logs Folder: Navigate to ~/Library/Logs/ and look for any logs related to the Android SDK. Move them to the Trash.
  5. Navigate to Caches Folder: Navigate to ~/Library/Caches/ and look for any caches related to the Android SDK. Move them to the Trash.

Step 4: Remove Gradle-Related Files

Including the removal of Gradle files as a distinct step in the manual removal process ensures that your uninstallation of Android Studio is comprehensive:

  1. Toggle Hidden Files Visibility: Open a new Finder window and toggle the visibility of hidden files by pressing (dot) on your keyboard and then pressing Command + Shift + ..
  2. Navigate to Gradle Folder: In Finder, click on "Go" in the menu bar, then select "Go to Folder," and type ~/.gradle in the search bar that appears. Press Enter to open the folder.
  3. Delete Gradle Folder: Once you’re in the .gradle folder, you can drag it to the Trash or right-click (control-click) on it and choose "Move to Trash."
  4. Empty Trash: Empty the Trash to remove the Gradle files from your Mac permanently.

Using Terminal for Uninstallation

For users comfortable with Terminal, deleting Android Studio can be done efficiently using command-line instructions:

  1. Open Terminal: Open Terminal by searching for it in Spotlight or by navigating to Applications > Utilities > Terminal.
  2. Delete Folders: Use commands like rm -rf ~/.android and rm -rf ~/.AndroidStudio* to delete specific folders.
  3. Delete JetBrains Folder: Use a command like rm -rf ~/Library/Application\ Support/JetBrains to delete the JetBrains folder.
  4. Delete SDK Folder: Use a command like rm -rf ~/Library/Application\ Support/Android to delete the SDK folder.

Additional Tips for Complete Removal

To ensure that all remnants of the SDK are removed, you should also check for any other related directories or files in your system. Here are some additional tips:

  1. Check Hidden Files: Sometimes, these folders might be hidden by default. To make them visible, go to the View tab in the file explorer and check the option for "Hidden items."
  2. Delete Remaining Folders: Look for any remaining folders related to the SDK in your user directory or other system directories and delete them.
  3. Verify SDK Manager: If you have installed the SDK Manager as part of your Android development setup, you should also uninstall it using the same steps as above.

By following these detailed steps, you can ensure that all remnants of the SDK are removed, preventing any potential conflicts or issues during future installations. Whether you are using Windows or Mac, the process involves a combination of uninstalling through the Control Panel or Finder, deleting specific folders and files, and ensuring that all related components are removed. Taking these steps will help you achieve a complete uninstallation of the Android SDK and start fresh with your development environment.

Was this page helpful?