Check what’s taking up space on root system folders in Android

This little trick is going to help you find which folder is taking up the most space. This is to be executed in a Terminal app that can run Linux commands.

There are many file manager applications on the Android platforms with my favourite being ES File Explorer. But it’s limited to what it can do when you use it as a root explorer. And I haven’t seen an application that can sort out the folder using the most space in Android. You can do it for your SD card contents with ES File explorer but not while exploring the root contents. However I haven’t tried the paid apps, so they could still be available.

android-partition-check-terminal-emulator

This little trick is going to help you find which folder is taking up the most space. This is to be executed in a Terminal app that can run Linux commands. I found it while trying to debug a partition problem with the “DU” and the “DF” command. Which I found later work differently to calculate the disk space usage. Here I’m using the trusty “Terminal Emulator“. Should work on any emulator as far as I know.

The command is:

du -m /data | sort -nr | head -n 20

The DU command scans the data partition for files and folders. The “/data” is the partition or folder that you want to scan. The “sort” command sorts the results and the “head” with “-n” attribute limits the number of results to return.

That’s it. Enjoy this neat little trick when you want to see what’s taking up the space in your Android root folder or partitions. If you have a better trick or a command, let us know in the comments.

Leave a Reply