DEV Community

Akshay
Akshay

Posted on

I Recovered 18GB of Disk Space from Android Studio and Gradle — So I Built a Cleaner Tool

If you're an Android developer, there's a good chance you're losing gigabytes of storage without realizing it.

A few days ago, I noticed my SSD was getting dangerously full. I hadn't installed any large software recently, so I started investigating where the space was going.

The biggest surprise?

C:\Users\<User>\.gradle
Enter fullscreen mode Exit fullscreen mode

My Gradle directory alone had grown to nearly 18GB.

And that wasn't the only issue.

Android Studio had also accumulated configuration folders from previous versions that were no longer being used.

Instead of manually cleaning everything every few months, I decided to build a small utility to automate the process.

Meet AndroidStudioCleaner.


The Hidden Storage Problem in Android Development

Over time, Android Studio and Gradle generate a large amount of cached and temporary data.

Common examples include:

.gradle\caches
.gradle\daemon
.gradle\wrapper
.gradle\.tmp
.gradle\workers
.gradle\notifications
Enter fullscreen mode Exit fullscreen mode

These folders can easily grow into several gigabytes after months (or years) of development.

Android Studio upgrades can also leave behind old configuration folders:

AndroidStudio2024.1
AndroidStudio2025.1
AndroidStudio2025.2
AndroidStudio2026.1.1
Enter fullscreen mode Exit fullscreen mode

Most developers only need the latest version, but the older ones often remain untouched and continue consuming storage.


Why I Built AndroidStudioCleaner

I wanted a solution that would:

  • Clean Gradle caches safely
  • Detect old Android Studio versions automatically
  • Keep the latest Android Studio configuration
  • Show exactly what will be deleted before making changes
  • Be lightweight and easy to use

The result is a simple Windows utility focused specifically on Android development cleanup.


Features

Gradle Cleanup

Removes:

.gradle\caches
.gradle\daemon
.gradle\wrapper
.gradle\.tmp
.gradle\workers
.gradle\notifications
Enter fullscreen mode Exit fullscreen mode

Benefits:

  • Reclaim storage space
  • Remove stale caches
  • Clear unused Gradle artifacts
  • Regenerate clean dependencies when needed

Android Studio Cleanup

Automatically scans:

%APPDATA%\Google
%LOCALAPPDATA%\Google
Enter fullscreen mode Exit fullscreen mode

Detects Android Studio versions such as:

AndroidStudio2024.1
AndroidStudio2025.1
AndroidStudio2025.2
AndroidStudio2026.1.1
Enter fullscreen mode Exit fullscreen mode

The utility:

✅ Keeps the latest version

✅ Removes older versions

✅ Prevents accidental deletion when only one version exists


Multiple Cleanup Modes

Choose exactly what you want to clean:

Full Cleanup

Gradle Cleanup
+
Android Studio Cleanup
Enter fullscreen mode Exit fullscreen mode

Gradle Cleanup Only

caches
daemon
wrapper
.tmp
workers
notifications
Enter fullscreen mode Exit fullscreen mode

Android Studio Cleanup Only

Remove old Android Studio versions
Keep latest version
Enter fullscreen mode Exit fullscreen mode

Safety Features

Deleting files automatically should always be done carefully.

That's why the utility includes multiple safety checks.

Startup Warning

Before cleanup starts, users are reminded to close:

  • Android Studio
  • VS Code
  • IntelliJ IDEA
  • Running Gradle builds
  • Project terminals

Preview Before Deletion

Nothing is removed immediately.

The utility first displays a preview:

Gradle folders to delete:

✓ C:\Users\User\.gradle\caches
✓ C:\Users\User\.gradle\wrapper

Old Android Studio versions:

✗ AndroidStudio2025.1
✗ AndroidStudio2025.2

Latest version to keep:

✓ AndroidStudio2026.1.1
Enter fullscreen mode Exit fullscreen mode

Users must explicitly confirm before cleanup begins.


Example Result

On my development machine, the tool recovered:

18+ GB
Enter fullscreen mode Exit fullscreen mode

of disk space.

The exact amount will vary depending on:

  • Number of Android projects
  • Gradle versions used
  • Android Studio upgrade history
  • Build frequency

But many Android developers are surprised by how much storage Gradle accumulates over time.


Download

Windows Executable

https://github.com/TutorialsAndroid/AndroidStudioCleaner/releases/download/v1.0.0/AndroidStudioCleaner.exe

GitHub Repository

https://github.com/TutorialsAndroid/AndroidStudioCleaner


Future Improvements

Planned features include:

  • GUI version
  • Progress bars
  • Disk usage analysis
  • Analyze-only mode
  • Running process detection
  • Cleanup reports
  • Additional Android development cleanup options

Final Thoughts

Android Studio and Gradle are incredibly powerful tools, but they can quietly consume tens of gigabytes of storage over time.

A periodic cleanup can free significant disk space and keep your development environment running smoothly.

If you're running low on storage, give AndroidStudioCleaner a try and see how much space you can recover.

⭐ If you find the project useful, consider starring the GitHub repository.

Top comments (0)