Are you trying to delete a file or folder on Android, but the system persistently gives an error: "Could not be deleted", "No access rights" or "The folder is being used by another process"? This is a typical situation when Android blocks the deletion of system files, application cache with rights su, or protected data SELinux. The reasons can be different - from bugs in the file manager to intentional protection on the part of the manufacturer (for example, Samsung or Xiaomi).

B In this article we will look at how to remove the โ€œundeletableโ€ - from simple tricks with the file system to advanced methods using 7 working ways remove "undeletable" - from simple file system tricks to advanced methods via ADB and Termux. Important: some methods require unlocking the bootloader or superuser rights, but we will also show solutions. without root. Let's start with the safest options and gradually move on to radical ones.

โš ๏ธ Warning: Deleting system files can lead to to device malfunction or loss of warranty. If you are not sure of your actions, create a backup copy via TWRP or a cloud service before experiments.

๐Ÿ“Š What type of โ€œnon-deletableโ€ files are you using? encountered?
System folders (DCIM/thumbnails, Android/obb)
Residual files after uninstalling applications
Files with the "no access" error
Other

1. Checking the basic reasons: why Android does not allow you to delete a file

Before resorting to radical methods, rule out obvious problems:

  • ๐Ÿ” The file is being used by the application. Close all apps that could open the document (for example, a photo gallery or video player). Check background processes in Settings โ†’ Applications โ†’ Running.
  • ๐Ÿ“ File system restrictions. Folders like /storage/emulated/0/Android/obb are protected from changes. Try deleting through another file manager (for example, FX File Explorer or Solid Explorer).
  • ๐Ÿ”’ Access rights (SELinux). On devices with Android 10+ even root access can be blocked by security policies. Check the status SELinux command getenforce v Termux.
  • ๐Ÿ›ก๏ธ Manufacturer protection. Brands like Huawei or Oppo can block the deletion of files in their shells (EMUI, ColorOS). data-i="78">Manufacturer protection. Files by Google.

If the file is still not deleted, go to the next section. If the problem is in system folder (for example, /data/data), you cannot do without root or ADB.

โš ๏ธ Attention: On some devices (for example, Samsung Galaxy s One UI 5+) an attempt to delete files from /Android/obb through a standard explorer can lead to a reset of access rights. Use alternative managers!

2. Removing via Safe Mode (without root)

If the file is blocked by a third-party application, try deleting it in Safe Mode (safe mode). In this mode, all user apps are disabled, which often solves the problem with โ€œbusyโ€ files.

How to start Safe Mode:

  1. Press the button power until the shutdown menu appears.
  2. Press and hold option Turn off (or Restart on some devices).
  3. Confirm the transition to Safe Mode (the screen will appear inscription).
  4. Try deleting the file through a standard explorer.

If the file was deleted, the problem was in the background process. Return to normal mode and check which application blocked access (most often it is Google Photos, WhatsApp or antiviruses).

โ˜‘๏ธ Preparing for deletion in Safe Mode

Done: 0 / 4

3. Using ADB (without root, but with debugging)

ADB (Android Debug Bridge) is an official tool from Google that allows you to manage files via the command line. The method works without root, but requires a switched on USB debugging computer.

Step-by-step guide:

  1. Enable Developer mode: go to Settings โ†’ About phone โ†’ Build number and press 7 times.
  2. Activate USB debugging in Settings โ†’ System โ†’ For developers.
  3. Connect your phone to the PC, install ADB drivers and open the command line in the folder with platform-tools.
  4. Check the connection command:
    adb devices

    The name of your device should appear.

  5. Delete the file with the command (replace the path with yours):
    adb shell rm -rf /sdcard/DCIM/.thumbnails/thumbdata4--1967290299

If an error appears Permission denied, try adding sudo (on some firmware) or Use run-as:

adb shell run-as com.android.providers.media rm /sdcard/DCIM/.thumbnails/*
โš ๏ธ Attention: Commands rm -rf delete files irrevocable, including subfolders. Make sure that the path is correct - an error in the command can erase important data!
ADB command Description Usage example
adb shell ls View files in the current directory adb shell ls /sdcard/Download
adb shell rm Delete a file adb shell rm /sdcard/oldfile.apk
adb shell rmdir Delete an empty folder adb shell rmdir /sdcard/empty_folder
adb shell mv Move a file (if deletion is blocked) adb shell mv /sdcard/blocked/file /sdcard/Download/

4. Termux: deleting files via a Linux terminal on your phone

If you donโ€™t have a PC, but have a Termux (Linux terminal emulator for Android), you can delete files directly from your phone. The method works on devices with Android 7โ€“14, but may require additional permissions.

Instructions:

  1. Install Termux from F-Droid (the version from Google Play is outdated).
  2. Update packages:
    pkg update && pkg upgrade
  3. Install a utility for working with files:
    pkg install coreutils
  4. Grant access to the storage:
    termux-setup-storage

    (allow the request to access files).

  5. Go to the folder and delete the file:
    cd /sdcard/Download
    

    rm unwanted_file.apk

If an error appears Read-only file system, then the folder is protected. In this case, only root or remounting the partition will help:

su

mount -o rw,remount /

๐Ÿ’ก

In Termux, you can use the command ls -lato see hidden files (starting with a dot) and their access rights. This will help you understand why the file is not deleted.

5. Root access: full control over the file system

If the previous methods did not work, and the file is critical for deletion (for example, a virus or residual data after a reset), you will have to use superuser rights. To do this you need:

  1. Unlock bootloader (on most devices this erases the data!).
  2. Install custom recovery (TWRP or OrangeFox).
  3. Flash Magisk to get root.

After getting root, use Root Explorer or Mixplorer with superuser mode enabled. Algorithm:

  • ๐Ÿ”“ Open the file manager and provide root access.
  • ๐Ÿ“‚ Go to the folder with the problematic file (for example, /data/app).
  • ๐Ÿ—‘๏ธ Hold the file โ†’ select Delete or Move.
  • ๐Ÿ”„ If the file is not deleted, change the access rights (chmod 777 via Termux).

To remove system applications (bloatware) use Titanium Backup or the command:

su

pm uninstall -k --user 0 com.example.bloatware

โš ๏ธ Attention: Removing system APKs (for example, com.sec.android.app.launcher on Samsung) can lead to bootloop (cyclic reboot) Before experiments, study the list of packages that are safe to remove for your model!
What to do if after deleting the system file the phone does not turn on?

If the device does not boot, try:

1. Go to TWRP and restore the backup.

2. Reflash the stock firmware via Odin (for Samsung) or Fastboot.

3. Use the command adb sideload to install the corrected image.

If there is no backup, flashing may be required with data loss.

6. Alternative methods: from formatting to resetting

If none of the methods help, radical measures remain:

  • ๐Ÿ”„ Reset to factory settings. Deletes everything, including protected files, but also erases all user data. Make a backup in advance!
  • ๐Ÿ’พ Formatting a memory card. If the file is on an SD card, format it via PC (file system FAT32 or exFAT).
  • ๐Ÿ“ฑ Flashing. Installing a clean firmware via Fastboot or Odin will return the file system to its original state.
  • ๐Ÿ–ฅ๏ธ Connect as an external drive (MTP). On a Windows/Mac PC, it is sometimes possible to delete files that Android โ€œdoes not see.โ€

To reset via Recovery Mode:

  1. Turn off the phone.
  2. Press Power + Volume up (the combination may vary).
  3. Select Wipe data/factory reset โ†’ Yes.

If the reset does not help, the problem may be hardware failure (damaged memory). In this case, only a service center will help.

๐Ÿ’ก

Before resetting or flashing, be sure to remove the SD card and SIM - this will protect them from accidental formatting.

7. Specific cases: what to do with...

Some files require a special approach. Let's look at the most common scenarios:

File type Reason for blocking Solution
Folder .thumbnails System thumbnail cache, protected from changes Delete via ADB or SD Maid (requires root)
Files in /Android/obb Piracy protection (game data) Use FX File Explorer s enabled root access
Residual data after uninstalling the application Incomplete uninstallation (folders remain in /data/data) Command pm uninstall or App Cloner
Files with the extension .nomedia Hidden from the media scanner, but physically exist Delete through any file manager (they are not protected)
System APKs in /system/priv-app Deletion protection (part of the firmware) Only via Magisk or flashing

For files associated with Google Account (for example, /Android/data/com.google.android.apps.photos), you may need to unlink the device from the profile in Settings โ†’ Accounts.

FAQ: Frequently asked questions

Is it possible to delete non-deletable files without root and ADB?

Yes, in some cases it helps:

  • Usage Safe Mode (if the file is locked by the application).
  • Connecting the phone to the PC and deleting it through Windows/Linux Explorer.
  • Using alternative file managers (MiXplorer, Amaze).

However, for system files (/data, /system) without root or ADB, you can practically bypass the restrictions impossible.

Why does it appear again after deleting a file?

This is typical for:

  • Application cache (for example, .thumbnails restored on reboot).
  • Synchronized data (Google Photos, WhatsApp).
  • Viruses, which restore themselves (check the phone through Malwarebytes).

Solution: disable auto-sync in the application settings or remove it completely.

How to delete a folder that is occupied by a process?

Determine which application is using folder:

  1. Install OS Monitor from F-Droid.
  2. Check the processes associated with the problematic folder.
  3. Force stop the application through Settings โ†’ Applications.

If it doesnโ€™t help, use ADB with the command adb shell fuser (requires root).

Is it possible to recover an accidentally deleted system file?

Yes, if you have:

  • TWRP backup - restore via recovery.
  • Stock firmware - reflash the phone via Odin/Fastboot.
  • Root access - copy the file from another device of the same model.

Without backup, recovery is unlikely, especially for files in /system.

Why are files from the MIUI folder not deleted on Xiaomi/Redmi?

The manufacturer blocks changes to:

  • /MIUI โ€” system data shell.
  • /Android/data/com.miui.* โ€” MIUI services cache.

Solution:

  1. Use ADB with the command adb shell pm clear com.miui.gallery (for the gallery).
  2. Disable protection in Settings โ†’ Accessibility โ†’ Full file access.