Many Android smartphone users are faced with a situation where the internal storage is filled to capacity, despite deleting photos and applications. Often the root of the problem lies in the system directory, known as data folder, which accumulates caches, remnants of deleted apps and system logs. However, the approach to cleaning this partition requires special care, since incorrect actions can lead to the device not working or the loss of important data.

In this article we will analyze in detail the structure of the file system, explain which files can be deleted manually, and which are strictly prohibited from being touched. You will learn about safe methods for freeing up space using standard tools and advanced tools for users with root access. It is important to understand the difference between user data and system files so as not to turn your Samsung Galaxy or Xiaomi into a “brick”.

⚠️ Attention: The folder /data is critical for operation of the operating system. Deleting key system files can lead to a cyclic reboot (bootloop) or complete loss of functionality of the smartphone. Always create a backup copy before starting any manipulations.

The structure of the data folder and its purpose

The directory /data in the Android system is the main section where all user data, application settings and system configurations are stored after the first start of the device. It is divided into several key subdirectories, each of which performs its own specific function. Understanding the file hierarchy will help you make informed decisions when cleaning.

Inside this directory there are subfolders appwhere installation files (APK) of third-party apps are stored, and dalvik-cachewhich contains optimized code for quickly launching applications. There is also a folder data (nested) located here, which contains databases, cache and personal settings for each installed software. It is this subdirectory that most often grows to gigantic proportions.

Particular attention should be paid to the section local or media, where downloads from instant messengers, temporary browser files and image thumbnails can accumulate. Some manufacturers, such as Huawei or Oppo, can create their own subdirectories for storing specific logs and telemetry. Without the need to get into system files system or vendor it is not recommended even for experienced users.

Safe cleaning methods without root access

For most users, the standard set of Android tools provides sufficient capabilities for safe cleaning of garbage without the need to obtain superuser rights. Modern versions of the operating system, such as Android 13 and 14, have strict access restrictions to system partitions, which protects the device from accidental damage, but also complicates deep cleaning.

The most effective way is to use the built-in storage manager. Go to Settings → Storage → Other apps and sort the list by space size. You can see which application consumes the most resources in the Data i Cachesection. Clearing the cache is safe and will not delete your logins or game progress, while clearing data will reset the app to its factory state.

💡

Use the “Free up space” function in the storage settings - the system itself will offer to delete old screenshots, large video files and rarely used applications.

You can also use a file manager, for example Files by Google or the built-in explorer from Samsung. These tools allow you to find duplicate files, old downloads, and temporary files in public folders, which are often part of the user-accessible data structure. Regularly cleaning the recycle bin after deleting files also frees up a significant amount of memory.

📊 How do you usually clean the memory on your phone?
Manually through the settings
Third-party cleaning applications
I connect it to a PC and clean it files
I do nothing until the phone starts to slow down

Advanced cleaning with Root access

Users who have received root accesshave full control over the file system and can delete files directly from system partitions that are inaccessible in the usual way. This will require specialized file managers, such as Root Explorer, Mixplorer or Solid Explorer with superuser mode enabled. This approach allows you to remove the “dead weight” remaining after uninstalling apps.

Before starting work, you must grant the file manager superuser rights through the app Magisk or SuperSU. After that, go to the root of the file system and open the directory /data/data. Here you will see folders with the package names of all installed applications (for example, com.whatsapp). Deleting an application folder that is no longer in the system will completely free up the space it occupied.

⚠️ Attention: When working with root access, the system will not warn you about an error before deleting a critical file. A single character error or deleting the wrong folder can make the system unable to boot. Proceed with extreme caution.

Particular care should be taken with the folder /data/dalvik-cache. Although deleting it is technically possible and is sometimes recommended in case of failures after a firmware update, the system will be forced to recreate this cache every time it boots, which will significantly slow down the phone in the first minutes after turning it on. Do this only if specific software errors occur.

☑️ Checklist before deleting files from Root

Completed: 0 / 4

Content analysis: what can be deleted

In order not to harm the system, it is important to clearly distinguish between files to be deleted and vital components. Below is a table that will help you navigate the variety of files inside the directory /data. Use it as a cheat sheet for manual cleaning.

Folder / File Description Can it be deleted? Consequences
/data/local/tmp Temporary files, debug logs Yes Safe, files will be created anew
/data/tombstones Memory dumps when application crashes Yes Free up space, lose error reports
/data/anr System freeze logs (Application Not Responding) Yes Safe
/data/data/[application_name] Specific application data Only if the application is deleted Loss of settings and accounts in the application
/data/system System settings and OS databases No Download failure, loss of Wi-Fi, Bluetooth settings

We should also mention the folder .thumbnails in the media section, which is often duplicated in system directories for quickly displaying the gallery. Clearing it will force the phone to regenerate thumbnails, which will temporarily increase the load on the processor, but will free up gigabytes of space. Files with the extension .log in various subfolders can also be safely erased if you are not debugging software.

What is the Android/obb folder?

This is a directory for storing additional cached data of heavy games and applications. Deleting files from here will cause games to require re-downloading resources at startup, but will not delete your progress if it is saved in the cloud.

Using ADB for deep cleaning

For users who don't want to Root but need access to hidden partitions, an excellent tool is Android Debug Bridge (ADB). This method allows you to delete files and folders through your computer using command line commands. It is safer than directly editing the system, since it requires explicit confirmation of actions.

To get started, you need to enable “USB Debugging” in the “For Developers” menu on your smartphone. Connect your device to your PC and open a terminal or command prompt. Enter the command adb shell to enter the device shell. Then you can use standard Linux commands for navigation and deletion.

adb shell

cd /data/local/tmp

ls -la

rm file_name.log

Using ADB, you can force clear the cache of all applications with one command, which cannot be done through the standard interface without resetting the settings. Team pm trim-caches (available on Android 10+) allows you to delete unused cache, freeing up space without deleting the apps themselves. This is a powerful tool for optimizing the performance of Pixel or other devices running pure Android.

⚠️ Attention: The command line interface does not have a “Cancel” button. The entered command is executed instantly. Be extremely careful when entering paths, especially when using a wildcard *.

Overflow prevention and automation

Regular folder cleaning data should not turn into a time-consuming routine. It is much more effective to set up automatic processes that will prevent the accumulation of garbage. Many modern launchers and utilities allow you to create device maintenance scripts.

Use automation applications such as Tasker or MacroDroidto configure the deletion of temporary files when a certain memory full threshold is reached. For example, you can create a task that once a week clears the folder Download and browser cache at night when the phone is not in use.

💡

Regularly rebooting the smartphone (at least once a week) helps the system automatically clear some temporary files and reset hung processes, freeing up RAM and permanent memory.

Also It’s worth reviewing your messenger settings. You can limit the automatic downloading of media files and set a limit on the cache size. This will prevent uncontrolled growth of the folder Telegram And WhatsApp You can limit the automatic downloading of media files and set a limit on the cache size. This will prevent the folder from growing uncontrollably data due to pictures and videos from chats. Remember that prevention is always easier and safer than treating a clogged storage.

Frequently asked questions (FAQ)

Is it possible to delete the entire data folder completely?

No, you absolutely cannot delete the entire folder. /data . This will delete all installed applications, settings, accounts and contacts. The phone will turn into a “brick” or require a complete flashing with the loss of all data. You can only delete individual subfolders within it, the purpose of which you know.

Why does the data folder take up so much space even after deleting applications?

When you standardly remove applications through settings, their configuration files, databases and caches often remain in the directory /data/data. This phenomenon is called "residual files". To remove them, you need root access or the use of special scripts via ADB.

Is it safe to use cleaner applications from the Play Market?

Most popular cleaners (for example, CCleaner, Clean Master) work in safe mode and clean only the public cache and garbage in the folder. Android. They do not have access to the system folder /data without root access, so they cannot cause critical harm to the system, but their effectiveness is often exaggerated by marketing.

What to do if after cleaning the phone stops turning on?

If the device is stuck on the logo when booting, try entering Recovery mode (usually by holding down the buttons volume and power) and perform a factory reset (Wipe Data/Factory Reset). This will delete all data, but will restore system functionality. If this does not help, you will need to flash it through your computer.

Does clearing the data folder affect the warranty of the smartphone?

Cleaning files through the file manager itself does not affect the warranty. However, obtaining root access (necessary for deep cleaning of system partitions) in most cases voids the manufacturer's warranty, as it is considered an intervention in the device software.