User Agents

Web browsers and everyday web tech, explained

How to Clear ADB Cache: Quick Android Fix

· 4 min read · Cookies and Cache

In this article
  1. What Is ADB and Why Cache Causes Issues
  2. Before You Start: Prerequisites
  3. Method 1: Clear Cache Partition via Recovery Mode (No ADB Needed)
  4. Method 2: Clear App Cache via ADB Commands
  5. Method 3: Clear Entire Cache Partition via ADB
  6. Common Problems and Misconceptions
  7. When to Use ADB vs Recovery Mode
  8. Safety and Precautions
  9. Frequently Asked Questions

To clear the ADB cache, connect your Android device to a computer with USB debugging enabled, then run adb shell pm clear com.android.providers.cache or use adb shell am broadcast -a android.intent.action.CLEAR_CACHE — but the safest and most common method is clearing the cache partition via recovery mode, which we detail below.

What Is ADB and Why Cache Causes Issues

ADB (Android Debug Bridge) is a command-line tool that lets your computer communicate with an Android device. It’s part of the Android SDK platform-tools. The cache is temporary data stored by apps and the system to speed up processes. Over time, corrupted or excessive cache files can cause app crashes, slow performance, or storage warnings. Clearing it forces the device to rebuild fresh cache files, often resolving these issues.

Before You Start: Prerequisites

  • Enable Developer Options: Go to Settings > About Phone, tap “Build number” 7 times.
  • Enable USB Debugging: In Developer Options, turn on “USB debugging”.
  • Install ADB on your computer: Download platform-tools from the official Android developer site (developer.android.com).
  • Connect your device via USB and accept the RSA fingerprint prompt on your phone.

Method 1: Clear Cache Partition via Recovery Mode (No ADB Needed)

This is the most direct method for clearing the system cache. It doesn’t erase personal data, only cached files.

  1. Power off your device.
  2. Press and hold Volume Up + Power (or Volume Down + Power on some models) until the recovery menu appears.
  3. Use volume keys to navigate to “Wipe cache partition”.
  4. Press Power to select, then confirm. Wait for the process to finish.
  5. Select “Reboot system now”.

This clears the cache for the entire system, not just a single app.

Method 2: Clear App Cache via ADB Commands

If you need to clear a specific app’s cache, use ADB commands. Open a terminal/command prompt in the platform-tools folder and run:

adb shell pm clear com.example.app

Replace com.example.app with the actual package name. This clears both cache and app data, so use it carefully. To clear only cache without data, you can use:

adb shell cmd package trim-caches 999G

This trims cache files to the specified size (here, effectively clearing all). It does not delete app data.

Method 3: Clear Entire Cache Partition via ADB

If recovery mode isn’t accessible, use ADB to reboot into recovery and wipe cache:

  1. Connect your device and run adb reboot recovery.
  2. Once in recovery, use the on-screen or volume buttons to select “Wipe cache partition”.
  3. Confirm and reboot.

This is essentially the same as Method 1 but initiated via ADB.

Common Problems and Misconceptions

“Clearing cache will delete my photos.” No — cache files are temporary and do not include personal media. It only removes temporary files that can be recreated.

“ADB commands are dangerous.” They are powerful, but the commands above are safe if you target the correct package or the cache partition. Avoid pm clear on system apps unless you know what you’re doing, as it may reset app settings.

“Why doesn’t my device show up in ADB?” Ensure USB debugging is on, and try adb kill-server then adb start-server. Also check that you’ve installed the correct USB drivers for your device.

When to Use ADB vs Recovery Mode

Recovery mode is easier and doesn’t require a computer, but it clears all system cache. ADB gives you granular control — you can clear a single app’s cache or trim overall cache size. If you’re troubleshooting a specific app, ADB is better. If the whole system is sluggish, recovery mode is simpler.

Safety and Precautions

  • Always back up important data before using pm clear on any app, as it resets app data.
  • Do not clear cache on system apps like Settings or System UI unless you’re sure, as it may reset system preferences.
  • Use the correct package name — you can list all packages with adb shell pm list packages.
  • If you’re not comfortable with command lines, stick to recovery mode.

Frequently Asked Questions

Will clearing ADB cache erase my personal files?

No. Cache files are temporary and do not include your photos, documents, or downloads. They are recreated as needed.

How do I find the package name of an app?

Run adb shell pm list packages to see all installed packages. You can also use adb shell pm list packages | grep 'keyword' to filter.

Is there a difference between clearing cache and clearing data?

Yes. Clearing cache removes temporary files only. Clearing data resets the app to its initial state, deleting login info, settings, and saved data. Use pm clear only when you intend to reset the app.

Can I clear cache without a computer?

Yes, via recovery mode as described in Method 1. You can also clear individual app caches from Settings > Apps > [App] > Storage > Clear Cache.

Why is my cache so large?

Apps like browsers, social media, and streaming services store lots of temporary data to speed up loading. Over time, this accumulates. Clearing it periodically is safe.

Does clearing cache affect battery life?

Not directly. It may temporarily increase CPU usage as apps rebuild cache, but it won’t harm battery life. In fact, clearing corrupted cache can improve efficiency.