1. Are you ready for the Galaxy S20? Here is everything we know so far!

The "Insufficient Storage" Problem

Discussion in 'Android Help' started by scary alien, Feb 27, 2016.

  1. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Ever gotten this message when attempting to install or update an app?

    Insufficient storage

    This device doesn't have enough space to download "<appname>".
    Consider deleting apps or content you no longer need and try again.

    This is simply a result of your device not having enough free storage in the app's primary installation location, which is the /data partition for user apps (and the /system partition for system apps--we're not really addressing the installation of system apps here, however).

    "Enough" appears to be at least ~512 Mb of free space in the /data partition (for user app installs).

    (edit: for older, smaller devices, this threshold is likely to be proportionally smaller depending on how much overall space the device has for it's internal memory)

    This appears to be a strategy and restriction of the Google Play Store app to ensure your device has enough free space for normal operations.

    The warning says "download" but it clearly doesn't always mean just that since you may indeed have enough free space to download and for the .apk file to be "expanded" (i.e., the base.apk, any library files, and expansion packs to be downloaded) and installed--you're simply bumping-up against an artificial limit/threshold set by the Google Play Store app.

    You will not be able to install any new apps (or likely update any currently installed ones) until you've freed-up enough space on the /data partition.

    Strategies for freeing-up space in the /data partition [2] include:

    1. Removing / un-installing user apps (will free-up space in /data/app, /data/dalvik-cache, and /data/data)

    2. Clearing app cache (will free-up space in /data/data)

    3. If your device symlinks the "SD card" to an internal location, removing files from your "SD card" (/sdcard) should free-up space in /data/media

    4. If you're trying to update and already-installed app and are getting the no free space warning, a full uninstall and a new install may help, but be aware that you may still likely need more than ~512 Mb of free space in your /data partition

    5. Failing the above, can take the "nuclear option" of performing a Factory Data Reset (be sure to backup any "SD card" or other data first off to a safe, off-device, separate location); this will uninstall / remove / reset all of your user apps, settings, and data to the same state it was when it was first purchased​

    You can use the Storage Truth app or the Linux shell's "df /data" command to display how much free space you have in the relevant app installation partitions (i.e., /system for system apps and /data for user apps).

    Edit: please note that there will undoubtedly be some folks who DO have enough (or more than enough) free space in the /data partition and yet will still be unable to successfully install or update an app. Please see my comments in post #3 below regarding this.

    Cheers and I hope this helps (or at least helps explains things).


    Other notes and final thoughts:

    [1] Testing Details
    - tests were done on my 16 GB, 2012, first gen Nexus 7 running Android 5.1.1 (stock, rooted)

    - I initially started with 5.6 GB of free space in the /data partition

    - I manually created new, large files in /data to reduce the free space down to about 600 Mb

    - I tested installing new apps while gradually reducing the free space (again, by creating new files and with the space that the new apps used-up)

    - apps continued to install just fine as long as the initial free space was above ~512 Mb

    - once you got below that ~512 Mb threshold, I would start receiving the "Insufficient storage" message

    - freeing-up space to above that ~512 Mb threshold allowed new apps to be installed once again

    - you can install a large app that will take you to (well) under the ~512 Mb threshold, but you likely will not be allowed to install additional new apps until you've gone back above the ~512 Mb threshold; for example, installing the HBO Go app took me down to 446 Mb of free space in /data, but could not install any new apps after that

    - you can see that the Google Play Store app also logs messages to the system log

    E/Finsky (25047): [1] InstallerTask.startNextDownload: Cancel download of com.HBO because insufficient free space
    D/Finsky (25047): [1] InstallerTask.cancelCleanup: Cancel running installation of com.HBO (null)
    D/Finsky (25047): [1] PackageInstallerImpl.cancelSession: Canceling session 1298837349 for com.HBO​

    [2] Makeup of the /data partition
    There are usually four directories on the /data partition that take up the most space on your device:


    this is where your user app's .apk file and libraries are extracted to after download/installation; note: the files under here can be significantly larger than the size shown in the Play Store listing; it appears that the size given in the Play Store listing is for just the base .apk file; other files like any libraries (.so files) it needs can significantly add to the size of what is actually downloaded to your device during installation; for example, the HBO Go app is listed as 22.12 Mb in the Play Store, but actually consumes 48.4 Mb due to 26.28 Mb of library files

    this directory stores the Android runtime executable (dex/oat/art) counterparts for the apps on your device (system and user)

    this is the "home" (or $HOME) folder for each of your apps on your device (again, user AND system); the app's cache and any files that are not explicitly stored or directed elsewhere (such as the "SD card") get stored here; this folder structure can obviously also consume a LOT of space on your device, but is wholly dependent on the makeup/mixture/use of these apps

    if your device does not have an external "SD card", it likely mounts (or symlinks) the external storage to a location on your /data partition, such as /data/media; this is likely also known / seen as /sdcard or /mnt/shell/emulated or /storage/emulated​

    There are indeed many other subfolders/directories in the /data partition other than ones listed above. However, these usually consume much less space and don't really need to be considered.

    Also, you typically can't see any details or contents of the first three of the above directories unless your device is rooted.

    [3] I used to think that the ~512 Mb free space limit in /data was limited to Samsung devices, but this is clearly not the case and seems to apply to ALL devices, given that I've seen the same free space restrictions on my stock Nexus device

    [4] The ~512 Mb threshold is approximate as I'm unsure if Google is using 1024*1024 or 1000*1000 to calculate a megabyte (Mb)

    [5] This threshold limitation is not new information for a lot of folks here at AF, but I wanted to test this out on a stock device that initially had plenty of free space in the /data partition an no other known issues w/app installation problems

    [6] I've scanned the AOSP sources (i.e., the package installer code) for information or references with regard to a disk space threshold value and didn't find any; this and the fact that the Google Play Store app (com.google.vending) contains many references to the "insufficient storage" message and the wide variety of devices we've heard about this issue on indicates it's not an OS or device specific threshold, but something common to the Google Play App

    [7] FYI, here are the string references to the various storage-related warnings I found in the Google Play Store app:

    This device doesn't have enough space to download "%1$s". Consider deleting apps or content you no longer need and try again.

    Can't download "%1$s", insufficient storage.

    "%1$s" can't be installed in the device's default install location. Review your device's storage and try again, if the problem continues, <a href=%3$s>get help troubleshooting.</a> (Error code: %2$d)

    "%1$s" can't be downloaded. Insert an <a href=%2$s>SD card</a> or USB storage with sufficient storage, and try again.

    Can't download "%1$s", not enough external storage.

    Uses one or more of: files on the device, such as images, videos, or audio; the device's external storage

    It seems like you're low on space. You can manually remove apps below to free up storage.

    App requires external storage

    Not enough external storage

    Insufficient storage available.

    Insufficient storage

    This device doesn't have enough space to download "%1$s". Consider deleting apps or content that you no longer need and try again.

    Uses one or more of: files on the device, such as images, videos or audio; the device's external storage



    #1 scary alien, Feb 27, 2016
    Last edited: Apr 1, 2016
  2. Best Answer:
    Post #3 by scary alien, Feb 27, 2016 (1 points)

    1. Download the Forums for Android™ app!


  3. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    I've been looking for a reference like this. Very nice SA :)
    scary alien likes this.
  4. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Thanks, @Lordvincent 90 :).

    I kind of wanted to test this myself and reinforce / verify what countless others (notably @Hadron) have indicated here: i.e., that there does seem to be kind of free space threshold being imposed when an app tries to install.

    Also, @EarlyMon's excellent thread here should be a good resource for all:

    ~ ~ ~

    It should be noted (and I'll update the first post above to reflect this, too) that it is not a given that having enough free space in /data will guarantee being able to successfully install new or update an app.

    We've seen many threads from people here at AF regarding this and for the most part, these cases have been difficult (if not impossible) to solve.

    These cases seem to indicate that something is "broken" or confused within Android itself since there are usually no obvious reasons for the failure to install (and the solution in those cases seems to, unfortunately, be a factory data reset). This excellent and detailed/deep page over at stackoverflow.com does an excellent job of fleshing-out and suggesting other reasons and alternative solutions to the "insufficient storage" problem:

    Of particular note is the answer given by Robert Siemer that points-out that Android's package installer code reports basically ANY installation problem as an "insufficient storage" problem. This clearly problematic and deeply frustrating for people who have enough free space and yet can't truly debug or fix the actual problem because the real issue is hidden and/or not reported (although without root, it's likely not something that the casual user would (or should) be able to fix).

    However, for the vast majority of people, recognizing that there seems to be a minimum amount of free space that is needed will be the solution to the "insufficient storage" problem.

    #3 scary alien, Feb 27, 2016
    Last edited: Feb 27, 2016
    mayl, Crashdamage, kate and 2 others like this.
  5. hippocrits

    hippocrits Newbie

    My two cents would just to install a third party application that deletes APKs after application installations. :)
    MoboPlay likes this.
  6. kate

    kate Dreaming of Bugdroid.

    Great information! :)

    I'm assuming you have the 8GB Nexus 7? Since the free space amount is lower for smaller storage phones it'd be interesting to see if the free space requirement scales up for a 64GB phone or stays around 512MB.
    Lordvincent 90 and scary alien like this.
  7. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Thank you, @kate :).

    I have the 16 GB 1st-gen/2012 Nexus 7.

    Yeah, I thought about that late last night and edited/amended the first post this morning and I will try to go back and test this on my other and older devices, too to see what the limit might be (if indeed it is still imposed / present).
    kate likes this.
  8. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Okay, quick, interesting update:

    I've finished tests on my LG Nexus 5 running 6.0.1 w/16 GB of storage and have seen confirmation that it's the Google Play Store that is imposing a /data partition free space threshold of 500 Mb (or 524,288,000 bytes *) [at least for this and the N7 I tested earlier].

    I confirmed that its the Google Play Store because I could install apps manually through adb even if I had only a few megabytes of free spaces on my /data partition. When using the Play Store, I could only install the same app (one of mine :p) when I had more than 500 Mb of free space on the /data partition.


    More tests later...

    * I verified the Mb units are 1024*1024 bytes because the Linux df command does indeed report the units in 1024 bytes.
    #7 scary alien, Feb 28, 2016
    Last edited: Feb 28, 2016
  9. dafi

    dafi Newbie

    Thanks @scary alien for a most informative post.
    I hate to spoil a good theory though... my Samsung Galaxy S2 (i9100) has had this problem on and off for ages, mainly on. The /data partition is 2GB with 590MB free - at present I cannot install or update apps. My friend with an identical phone has only 330MB free and has never seen this error - can install and update apps at will ??
    Some questions:
    - is there any reason not to delete some or all of the .apk files in /data/app folder?
    - who decides that the /data partition is only 2GB? Can I change this? There is plenty of spare internal memory. I notice on my Galaxy tablet it is about 11GB.
    scary alien likes this.
  10. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    You're most welcome...and I'm not surprised at all that there might be these cases that don't reinforce the theory conjecture (is probably a better word for this). I really do think that the test/limit/threshold is in the Market/Play Store app an not necessarily in the O/S (Android) proper (reference my direct install tests via adb with even an extremely small amount of free space). It might be interesting to see/compare the version ids/strings for your two Play Store apps...

    I'm guessing those are kept and needed after the initial app install for when/if the app needs to be recompiled (like when a new version of Android is released and the Dalvik compiler is updated (or when you go from Dalvik to ART, etc.)).

    It's likely a conversation that the carrier had with the manufacturer to decide how much space to allocate to the various partitions. The proportions / ratios for one users might not be ideal for another user, though, so it's always a guess/compromise based upon how much space is needed for the OS and all of the other transient files that might be needed by a wide-variety of users/uses.

    Lordvincent 90 likes this.
  11. dafi

    dafi Newbie

    And can I change the /data partition size? Or is that what ThePhizzle is describing?
  12. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Oh, sorry I missed/forgot that point...well, he was talking about doing an "apps2sd" type of deal where you're using your external SD card to house/move some of your app storage. You definitely need to be rooted to (try) to do that, though.

    Re-sizing and re-partitioning the /data partition on your device though would likely require a custom ROM (again, you need to be rooted) and possibly a custom kernel. That's a case of robbing Peter to pay Paul, though--you'll have to make sacrifices and changes to the other partitions, too, to do (attempt) this. Very device and Android version dependent.

    Doing either of these things is a discussion best left to the root areas for your specific device since it would be way beyond the scope of this thread.
    ThePhizzle and Lordvincent 90 like this.
  13. dafi

    dafi Newbie

    Ah I see. Sounds too complex for me... the device is rooted and running CyanagenMod. Having said that space may not be my issue as I have now just over 600MB free and I am still getting the dreaded error :-(
  14. scary alien

    scary alien not really so scary
    VIP Member Thread Starter


    Since you've got a rooted device, you've got more "power" and capability to debug and diagnose than the average user.

    Take a peek at the stackoverflow.com links in post #3 above for more ideas and things to try--there are really a myriad of reasons why and how an app installation can (and does) fail.

    Also, it would be interesting to see how a manual adb install would behave for you--I'm wondering if you could install an app manually (I know that doesn't help you download and install it from the Play Store, but it might be illustrative and instructive as to what might be going on on your device).
    Qweenb likes this.
  15. dafi

    dafi Newbie

    Thanks for your interest. I have tried an install using ADB and it too fails.

    c:\Program Files (x86)\Android\android-sdk\platform-tools>adb install D:\Downloads\com.adobe.reader_v16.0-141690_Android-4.0.3.apk
    7044 KB/s (12190260 bytes in 1.690s)
    pkg: /data/local/tmp/com.adobe.reader_v16.0-141690_Android-4.0.3.apk

    I am using Adobe Reader as my test app. I now have 838.7MB free in /data as reported by Storage Truth.

    I did read the Stackoverflow threads which were quite interesting but didn't suggest anything that looked helpful to my case.

    My friend's Galaxy S2 has slightly more recent versions of Play Store app and Google Play Services but when I tried to update the Play Store app it tells me I am up to date (V6.0.7)?

    What else can I look at?
    scary alien likes this.
  16. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    If that's an app that you had previously installed, I think the first thing I'd try to do would be to look for remnants of the package name that might have been left on your device:

    find /data -name 'com.adobe.reader*' 2> /dev/null
    find /system -name 'com.adobe.reader*' 2> /dev/null

    That seems to have been somewhat of a theme of others that reported installation issues is that prior installs or uninstalls left parts of the app hanging-around and gumming-up the works.
  17. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    @scary alien when you download from the play store, where is the application downloaded to prior to install?

    Could an overstuffed cache partition also prevent installation?
    Qweenb, ThePhizzle and scary alien like this.
  18. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Not sure, LV...that's a good thought though that one should look at all aspects of your device for anomalies.

    I don't think the logcats that I captured and scanned indicated anything other than the download was happening (i.e., no targets specified). I would imagine though that it's the /data/app area since that's where the eventually .apk file will be kept--why download it to somewhere else (and yet another point of failure) and them move it to there?

    I'm not at my dev machine to do any detailed debugging, but I'm betting on /data/app :).
    ThePhizzle and Lordvincent 90 like this.
  19. Lordvincent 90

    Lordvincent 90 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓

    Wouldn't a direct download to /data/app/ cause incomplete files to clutter /data if the download was interrupted? (Like in the case of a battery pull or play store crash or something)
    #18 Lordvincent 90, Mar 31, 2016
    Last edited: Mar 31, 2016
  20. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Yeah, I would think that's a possibility (and heavily implied by the scenarios listed in the stackoverflow.com links), but you'd also think they'd have some type of cleanup process, too (maybe ;p :p).
    Lordvincent 90 likes this.
  21. dafi

    dafi Newbie

    @scary alien you were onto something here. I searched and found 20 files and folders related to previous installations of Adobe Reader. I deleted them all and hey presto was able to install AR! Some were in /data/app-lib. I now have 13 other apps that won't update so I guess I need to repeat the exercise for these too GROAN!
  22. scary alien

    scary alien not really so scary
    VIP Member Thread Starter


    Qweenb and Lordvincent 90 like this.
  23. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Just a quick note and reference to this thread where a member was experiencing an "insufficient storage" problem that turned out to be because a setting/option was enabled that told Android to install new apps to the external media/storage location that was lacking in enough space for new app installs.

    This is likely a rare situation for most folks since you would have to have previously explicitly issued the "pm set-install-location 2" command ("pm" being the package manager utility). The pm utility can be accessed/invoked from an adb shell or from an on-device app like Terminal Emulator for Android.

    You can check the current setting for your device using the pm get-install-location command:

    pm get-install-location: returns the current install location.

    0 [auto]: Let system decide the best location
    1 [internal]: Install on internal device storage
    2 [external]: Install on external media​

    Qweenb and Lordvincent 90 like this.
  24. alpstree

    alpstree Lurker

    Many thanks!
    scary alien likes this.
  25. Jsilva71361

    Jsilva71361 Lurker

    Is there a forum, or thread that explains all this in American English? LOL

    I can't imagine the time and effort put I to learning the technical details you guys write about. And I admire your ability to understand these details.

    That being said, the information
    presented here is useless to the average layman.
    Qweenb likes this.
  26. scary alien

    scary alien not really so scary
    VIP Member Thread Starter

    Hey @Jsilva71361, welcome to our AndroidForums.

    Unfortunately, there are so many aspects of this particular issue (and it's resolution), it's hard to distill it down to a brief answer, but I'll try:

    in a lot of cases, you need at least 500Mb of free space in your /data partition in order to install new apps

    The rest are details, exceptions, other circumstances that back this up or give rationale for it. It's not always true or the case with all people and devices, but is likely true for a good percentage of those that encounter this.

    Cheers and I hope that helps :).
Similar Threads - Insufficient Storage Problem
  1. tbfavero
  2. spl4000
  3. kumaranil13k
  4. kumaranil13k
  5. kumaranil13k
  6. kumaranil13k
  7. steelpegasus
  8. kumaranil13k
  9. halfbeing

Share This Page