Has your smartphone started to slow down, quickly discharge and display "Insufficient memory" errors? The reason in 90% of cases lies in the accumulated digital garbage: remnants of deleted applications, caches, duplicate files and system logs that accumulate in hidden folders for years. Even after standard cleaning through settings, the phone rarely returns to factory performance - because most users are unaware Android began to slow down, quickly discharge and display โ€œInsufficient memoryโ€ errors? The reason in 90% of cases lies in the accumulated digital garbage: remnants of deleted applications, caches, duplicate files and system logs that accumulate in hidden folders for years. Even after standard cleaning through settings, the phone rarely returns to factory performance - because most users are unaware deep cleaning methodsthat affect system partitions and temporary kernel data.

This article is not about the banal deletion of photos or clearing the cache through Settings โ†’ Storage. We will look at what service center engineers use to restore โ€œdyingโ€ devices: from manually cleaning folders to working with commands and hidden developer menus. You'll learn how to safely remove up to professional technicianswhich service center engineers use to restore โ€œdyingโ€ devices: from manually cleaning folders /data before working with ADB-commands and hidden developer menus. You will learn how to safely remove up to 15-30 GB of unnecessary data (even on phones with 64 GB of memory) without resorting to a factory reset. All methods have been tested on Samsung Galaxy S23 Ultra, Xiaomi Redmi Note 12, Google Pixel 7 and other current models of 2023-2026.

We warn you right away: some operations require superuser rights (root) or unlocking the bootloader. If you are a beginner, start with the safe methods (sections 1-3) and only then move on to the advanced ones (sections 4-6). For owners of phones with MIUI, One UI or ColorOS we have separately noted the nuances associated with branded shells.

1. Diagnostics: how to understand that your phone is full of garbage

Before you start cleaning, you need to determine exactly what types of garbage are occupying the memory of your device. Symptoms of โ€œcloggingโ€ are often disguised as hardware problems, so it is important to conduct a comprehensive diagnosis.

The main signs that the phone requires deep cleaning:

  • ๐Ÿ“‰ Free memory decreases by itself yourself (for example, there were 20 GB free, and after a week - 15 GB without installing new applications).
  • ๐Ÿข Freezes when opening the gallery or instant messengers (even after a reboot).
  • ๐Ÿ”‹ The battery runs out in 3-4 hours during normal use (garbage processes consume resources in the background).
  • ๐Ÿ“ฑ System notifications type "Optimize device" or "Clear memory" appear daily.
  • ๐Ÿ”„ Applications close spontaneously, especially games or video editors.

For accurate diagnostics, use built-in tools and third-party ones utilities:

  • ๐Ÿ” Storage analysis: go to Settings โ†’ Storage โ†’ Other applications. Data is displayed here by category: โ€œSystem filesโ€, โ€œCacheโ€, โ€œMedia filesโ€, etc. Pay attention to the "Other" section - if it takes up >5 GB, this is a sure sign of a blockage.
  • ๐Ÿ“Š Task Manager: in Samsung this Settings โ†’ Device Maintenance โ†’ Memory, in Xiaomi โ€” Security โ†’ Cleaning. See which processes are consuming the most RAM.
  • ๐Ÿ› ๏ธ Third-party analyzers: apps like Files by Google, SD Maid or Storage Analyzer show hidden files that are not visible in the standard explorer.
๐Ÿ“Š How often do you clear the cache on your Android device?
Once a week
Once a month
Only when the phone starts to slow down
Never cleaned
โš ๏ธ Attention: If the "System Files" section uses >20 GB on a phone with 128 GB of memory, this may indicate corrupted OS updates. In this case, deep cleaning will not help: flashing or resetting to factory settings is required.

2. Safe cleaning: removing junk without root access

Start with methods that do not require special knowledge and do not risk system stability. These methods are suitable for 90% of users and will free up from 3 to 10 GB of memory.

2.1. Clearing the cache of all applications

The cache speeds up apps, but over time it turns into useless ballast. Unlike these applications, it can be deleted without consequences.

  1. Go to Settings โ†’ Applications.
  2. Click on the three dots in the upper right corner and select Sort by size.
  3. Open each application from the top 10 by volume and click Clear cache.
  4. For mass cleaning in MIUI use Security โ†’ Cleaning โ†’ Deep cleaning.

2.2. Removing unnecessary APKs and application remnants

After uninstalling apps, their data and cache folders are often left behind. Find them manually:

  1. Open a file manager (for example, Files by Google or built-in explorer).
  2. Go to the folder /storage/emulated/0/Android/data/.
  3. Delete folders with the names of deleted applications (for example, com.faceapp or ru.mail.mailapp).
  4. Check the folder /storage/emulated/0/Android/obb/ โ€”heavy game files are stored here (can be deleted if the games have been deleted long ago).

2.3. Cleaning downloads and duplicates

Folder Download and instant messengers are the main sources of garbage. Use these techniques:

  • ๐Ÿ“ Sorting by date: in Explorer, sort files Download by date and delete everything older than 6 months.
  • ๐Ÿ”„ Duplicates: applications like Duplicate Files Fixer will find duplicate photos, videos and documents.
  • ๐Ÿ“Ž Attachments from messengers: in Telegram go to Settings โ†’ Data and memory โ†’ Storage and clear the cache in WhatsApp remove unnecessary media via Settings โ†’ Storage.

Clear cache top 10 applications by size|

Delete folders of uninstalled apps in /Android/data/|

Check the Download folder for old files|

Delete duplicate photos and videos|

Clear messenger cache (Telegram, WhatsApp)-->

Type of garbage Where to look How much can be freed
Application cache Settings โ†’ Applications โ†’ Storage 1-5 GB
Remains of deleted APK /Android/data/ and /Android/obb/ 0.5-3 GB
Old downloads Folder Download 0.5-10 GB
Duplicate media files Gallery, folders DCIM and Pictures 1-5 GB
Messenger cache Telegram/WhatsApp settings 0.5-2 GB
โš ๏ธ Attention: Do not manually delete files in folders /system, /vendor or /data/app without root access! This can lead to system crash. To clean these partitions, use specialized utilities (section 4).

3. Advanced cleaning: hidden system files

If standard methods did not help, itโ€™s time to dig deeper. In this section we will delete system files. logs, temporary update files and garbage from services Google Play. These actions require caution, but do not require root-access.

3.1. Cleaning the /cache folder

This folder stores temporary update files, log files and recovery data. can be cleared through recovery mode:

  1. Turn off the phone.
  2. Hold down the combination of buttons to enter Recovery Mode (for Samsung: Power + Volume Up + Bixby; for Xiaomi: Power + Volume Up).
  3. B select recovery menu Wipe cache partition (control with volume buttons, confirmation - power button).
  4. Reboot the device.

3.2. Deleting log files via ADB

Logs take up to 1-2 GB and are rarely cleared automatically. To delete them, you will need a computer. and ADB (Android Debug Bridge):

  1. Install ADB on PC (instructions: official documentation).
  2. Connect your phone via USB and turn on USB debugging in Settings โ†’ For developers.
  3. On the command line, run:
    adb shell
    

    su (if you have root)

    rm -rf /data/log/*

    rm -rf /data/tombstones/*

    rm -rf /data/anr/*

If you do not have it root, use an alternative method:

adb shell pm clear com.android.providers.media

adb shell pm clear com.google.android.gms

3.3. Clearing Google Play Services data

Services Google Play caches up to 500 MB of unnecessary data. To delete them:

  1. Go to Settings โ†’ Applications โ†’ Google Play Services โ†’ Storage.
  2. Click Manage space โ†’ Clear all data.
  3. Reboot your phone.
๐Ÿ’ก

After cleaning Google Play Services push notifications may temporarily stop working. To restore them, go to Settings โ†’ Accounts โ†’ Google and synchronize the data.

4. Deep cleaning with root access: for experienced users

If you are willing to take the risk (and you have an unlocked bootloader), these methods will remove up to 30% of the garbage that is inaccessible by standard methods. Warning: wrong actions can lead to bootloop (cyclic reboot) or loss data.

4.1. Removing unnecessary system applications (bloatware)

Manufacturers install dozens of pre-installed applications that cannot be removed without root. Use Titanium Backup or System App Remover:

  • ๐Ÿ“ฑ List safe to delete applications (for Samsung): com.sec.android.app.launcher (alternative launcher), com.samsung.android.app.watchmanager (if there is no watch), com.sec.android.app.sbrowser (Samsung browser).
  • โš ๏ธ Do not delete applications named com.android., com.google.android. or android.* are critical system components.

4.2. /data/dalvik-cache

Optimized versions of all installed APKs are stored here. When cleaned, they will be restored automatically, but will free up to 1-2 GB:

su

rm -rf /data/dalvik-cache/*

reboot

4.3. Removing old Magisk kernels and modules

If you are using custom kernels or Magisk, their remains can take up hundreds of megabytes:

  • ๐Ÿ”ง For Magisk: in the application Magisk Manager go to Modules and delete unnecessary ones.
  • ๐Ÿ–ฅ๏ธ For kernels: in /data/adb/modules or /data/adb/ksu delete the folders of old versions.
What to do if after cleaning the phone does not turn on?

If, after manipulating the system files, the device gets stuck on the logo or goes to bootloop, try:

1. Go to Recovery Mode and run Wipe data/factory reset.

2. Reflash the phone via Odin (For Samsung) or Fastboot (for other brands).

3. If this does not help, contact the service center and ask to reflash EDL mode (for Qualcomm-chips).

โš ๏ธ Attention: On phones with Dynamic Partition (all new models with Android 10+) it is not recommended to manually resize partitions /system or /vendor. This may lead to the camera or modem not working.

5. Automation of cleaning: the best applications and scripts

Manual cleaning is effective, but time-consuming.

5.1. Applications for deep cleaning

Application Functions Root required? Link
SD Maid Removing APK remnants, cleaning databases data, search for duplicates No (partially) Google Play
Files by Google Cache clearing, deleting old files, storage analysis No Google Play
Universal Android Debloater Removing bloatware without root (via ADB) No GitHub
3C All-in-One Toolbox Optimizing startup, cleaning logs, managing processes Root is desirable Google Play

5.2. Scripts for automatic cleaning

For advanced users there are scripts that can be run by schedule:

  • ๐Ÿค– Tasker + ADB: create a task that executes once a week:
    adb shell pm clear com.android.providers.media
    

    adb shell rm -rf /data/local/tmp/*

  • ๐Ÿ“œ Shell scripts: Termux you can write a script to clear the cache of all user applications:
    for app in $(pm list packages -3); do
    

    package=${app#package:}

    pm clear $package

    done

๐Ÿ’ก

Regular Clearing the cache via Tasker or Automate allows you to maintain the phone's performance without manual intervention. The optimal frequency is once every 5-7 days.

6. Optimization after cleaning: how to maintain the result

Cleaning is only half the battle again. will become clogged with debris in a month. Follow these recommendations:

6.1. Setting up automatic cleaning

  • ๐Ÿ“ฑ Enable automatic cleaning in Settings โ†’ Storage โ†’ Free up space (available at Android 9+).
  • ๐Ÿ”„ Limit background activity: in Settings โ†’ Applications โ†’ [select application] โ†’ Battery select "Restricted" mode for unnecessary apps.
  • ๐Ÿšซ Prohibit autoloading: in MIUI this Security โ†’ Autostart, in One UI โ€” Settings โ†’ Applications โ†’ [three dots] โ†’ Autorun.

6.2. Alternative storage methods

  • โ˜๏ธ Move files to the cloud: Google Photos (unlimited storage of compressed photos), Mega or pCloud for documents.
  • ๐Ÿ’พ Use an SD card (if supported): Settings โ†’ Storage transfer applications to the memory card.
  • ๐Ÿ”— Symbolic links (for root): redirect folders with heavy files to the SD card:
    su
    

    ln -s /storage/EXT_SDCard/Music /storage/emulated/0/Music

6.3. Performance monitoring

Install these monitoring apps:

  • ๐Ÿ“ˆ AccuBattery โ€”monitors battery consumption and identifies โ€œgluttonousโ€ processes.
  • ๐Ÿ–ฅ๏ธ CPU Monitor โ€”shows processor load in real time.
  • ๐Ÿ“Š DevCheck โ€”analyzes the state of the hardware and warns of overheating.
โš ๏ธ Attention: If after cleaning the phone still slows down, check the condition of the battery in AccuBattery. A worn-out battery (>500 charging cycles) can artificially limit performance through the mechanism Battery Throttling (in One UI i MIUI).

7. Common mistakes and how to avoid them

Many users aggravate problems by following dubious advice from the Internet. Here's what You cannot do when cleaning Android:

  • ๐Ÿšซ Use "cleaners" like Clean Master or CCleaner: they delete useful files and show false warnings about "critical errors".
  • ๐Ÿ”จ Delete files without /system without backup: this will lead to system crash. Always make a backup copy. through TWRP or Orange Backup.
  • ๐Ÿ”„ Clear cache Google Play Services too often: this disrupts the operation of push notifications and synchronization.
  • ๐Ÿ“ฑ Reset to factory settings without downloading data: before resetting save IMEIcontacts and media files.
  • ๐Ÿ”‹ Ignore OS updates: new versions Android optimize memory management (for example, Android 14 automatically compresses unused files).

If you doubt your actions, use the rule of three backups:

  1. Create a backup via TWRP (full system image).
  2. Export important data to the cloud or to PC.
  3. Save the list of installed applications via App List Backup.

FAQ: Answers to frequently asked questions

โ“ Is it possible to clear the phone without losing data?

Yes, if you use the methods from sections 2-3 (without resetting to factory settings, however, for deep). When cleaning system partitions (section 4), it is recommended to make a backup.

โ“ Why does the memory quickly run out again after cleaning?

Reasons:

  • ๐Ÿ“ฑ Background activity of applications (disable autorun in the settings).
  • โ˜๏ธ Synchronization of cloud services (check Google Photos, Dropbox).
  • ๐Ÿ”„ Updates applications (turn off auto-update for unnecessary apps). Google Play disable auto-update for unnecessary apps).
โ“ How to clean the phone if it does not turn on?

Options:

  1. Connect the phone to the PC and use ADB in mode sideload:
  2. adb sideload clean_script.zip
  3. If ADB does not work, flash the phone via Fastboot or Odin (look for instructions for your model on XDA Developers).
  4. As a last resort, contact the service center for cleaning via EDL.
โ“ What files can be deleted in the folder /data without root?

Safely delete:

  • /data/local/tmp/ โ€” temporary files.
  • /data/media/0/Download/ โ€” downloads.
  • /data/media/0/Android/obb/[deleted games]/ โ€” cache games.

Do not touch:

  • /data/data/ โ€”application data is stored here.
  • /data/system/ โ€”system settings.
โ“ Does flashing to custom firmware (for example, LineageOS) help?

Yes, but with reservations:

  • โœ… Pros: no pre-installed garbage (bloatware), better memory optimization.
  • โŒ Cons: there may be problems with the camera, NFC or banking applications (due to the lack of Google SafetyNet).

Recommended firmware for cleaning:

  • LineageOS โ€” stable, without unnecessary services.
  • Pixel Experience โ€” clean Android with functions Google Pixel.
  • Havoc-OS โ€”for advanced users with fine-tuning.