How To Completely Uninstall Android Studio On Ubuntu?

Last Updated : 23 Jul, 2025

To entirely uninstall Android Studio from your Ubuntu system, you have to follow a lot of steps. These steps include: uninstalling the application, and removing associated files plus its configuration so that no traces of it remain behind after removal. This article aims to provide clear instructions on how to completely remove Android Studio from an Ubuntu operating system.

1

Uninstalling Android Studio

  • The very first step that users must carry out is to uninstall the application for Android Studio. The terminal can be used to do this. Open a terminal window by pressing `Ctrl + Alt + T `
  • Look for a folder in which Android Studio has been installed. Assuming you’ve completed the regular process of installation it is likely installed in the `/opt` directory
  • The last step is to remove the Android Studio directory. The command for it is mentioned below:

sudo rm -rf android-studio

Removing SDK and Configuration Files

The Android SDK is utilised by Android Studio, which is generally stored in the user's home. directory. Users are required to erase this along with any occult configuration files that are associated with it.

  • As the first step, remove the Android SDK directory by using the below-mentioned command:

rm -rf ~/Android/Sdk

  • Next (as mentioned above), delete the hidden configuration files and directories. These can be found in the home directory and include (.AndroidStudio) and (.android).
  • If you have any other related directories, such as `.gradle` or `.m2` (Maven), and you are sure you do not need them, you can remove them as well. Removing these unwanted configurations and files ensures that the uninstallation process (once initiated) will be successful without any technical errors/blockages.

Removing System Configuration Files

System directories might contain configuration files that could have been added by Android Studio. Be sure to include those if you want a full uninstallation without any residue left behind.

  • If a user has used a package manager like `snap` or `apt` to install Android Studio, then they must uninstall it with the use of the specific package manager. The appropriate command is as follows:

sudo snap remove android-studio or sudo apt remove android-studio

  • Ensure to clean up any remaining configuration files in the `/etc` directory by using the following command:

sudo rm -rf /etc/android-studio

Cleaning Up Environmental Variables

You will need to remove any new paths that have been added by the Android SDK and Android Studio from your environmental variables for a clean uninstallation to be guaranteed. Here is how you can do it:

  • Open the `.bashrc` file in your home directory with a text editor:

nano ~/.bashrc

  • Locate any lines that export Android-related paths, for example:

export ANDROID_HOME=~/Android/Sdk

export PATH=$PATH:~/Android/Sdk/tools

export PATH=$PATH:~/Android/Sdk/platform-tools

  • Remove these lines and make sure to save the file. Then, exit the editor by pressing `Ctrl + X`, then `Y`, and `Enter`.
  • Lastly, update your terminal session with the modified `.bashrc` file:

source ~/.bashrc

Checking for Leftover Packages

You might still have certain packages installed while using Android Studio. It is important to delete any packages you no longer use with your package manager to ensure a complete and smooth uninstalling process.

  • Use the `apt` package manager to autoremove unused packages:

sudo apt autoremove

  • You can also clean up orphaned packages that are no longer required by this command:

sudo apt-get autoremove --purge

2

Final Cleanup

To ensure no residual/unwanted files are left behind, it’s a good idea to perform a final cleanup before completely uninstalling Android Studio on Ubuntu:

  • Check for any remaining files in your home directory related to Android development tools
  • Clear the package manager cache to get more space
  • Reboot your system to carry out the uninstallation process

Conclusion

To completely remove Android Studio from your Ubuntu, you should follow the steps mentioned in our article. This ensures that as the application gets deleted, all associated files, settings, and dependencies are as well.

Keeping your system clear of unused software and files can help retain its performance and prevent potential technicalities in the future. If you ever decide to reinstall Android Studio, you can do so with a clean device, free of any configurations or files from previous installations.

Also Read

Comment