141

The total space of my app is 10 MB, and after installation it will take less than 20 MB. In Galaxy Note I, while updating my app, it's saying "Insufficient Storage Available", where there is 214 MB of free space in device memory (internal). It happens even trying to download a new app.

I searched long for the solution, and a perfect reason for the cause of this problem, but I can't find it. How do I fix this problem?

This is the result of the 'adb shell df' in my another device which has the same problem. It has 35 MB free space:

/dev: 115788K total, 0K used, 115788K available (block size 4096)
/mnt/asec: 115788K total, 0K used, 115788K available (block size 4096)
/system: 179840K total, 168376K used, 11464K available (block size 4096)
/data: 201856K total, 168524K used, 33332K available (block size 4096)
/cache: 108544K total, 1284K used, 107260K available (block size 4096)
/cdrom: 8960K total, 8632K used, 328K available (block size 4096)
/tmp: 2048K total, 28K used, 2020K available (block size 4096)
/pds: 1536K total, 1320K used, 216K available (block size 4096)
/mnt/sdcard: 1928992K total, 1014496K used, 914496K available (block size 32768)
/mnt/secure/asec: Permission denied
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sniper
  • 2,412
  • 11
  • 44
  • 49

27 Answers27

178

Here's a very simple solution that works on my Samsung Galaxy S II and Note 1; I have no idea about other models:

  1. Open the phone app and switch to keypad.
  2. Dial *#9900#
  3. On the screen that appears, click on the button labelled "Delete dumpstate/logcat".

I've restored about one GB of system space this way.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Berislav Lopac
  • 16,656
  • 6
  • 71
  • 80
  • 3
    It did remove internal space (approx. 300 MB) on my Galaxy Note 1 but worth to be noted. +1 from my end. – Mohammad Arif Nov 01 '13 at 03:39
  • Yes. This works. The reboot did not work... Deleting the dumpstate / logcat freed up 800 MB on my Galaxy S2 – Varun Verma Nov 06 '13 at 08:25
  • 15
    Wrong answer to _this_ problem. There is no shortage of internal storage _here_!!! – Robert Siemer Nov 08 '13 at 09:48
  • I had the same problems with insufficient storage. After "Delete dumpstate/logcat" I had 900 MB of free internal space instead of 200 MB before. So definitely worth a try, if you can't update your apps even if it looks like you have enough space available. – cemonds Nov 08 '13 at 10:08
  • 13
    It doesn't work for non-stock diallers apparently (e.g. CyanogenMod) but see rhlee's answer for how to do the same thing if you get the "invalid MMI" error when you try this on a rooted, modded phone. – ChrisC Nov 14 '13 at 01:52
  • @RobertSiemer Perfect answer in my case - had the same issue, but seemingly still a lot of internal storage space; fixed it for me. – decPL Nov 26 '13 at 18:21
  • @decPL 1) What do you mean with “internal storage space”? 2) How big is it in total? 3) How much was free before doing “delete dumpstate/logcat? 4) How much was free after doing this?) ... Last but not least: my firmware has no `*#9900#` action. – Robert Siemer Nov 27 '13 at 02:32
  • @decPL My phone reports two “internal storages” (Android 4.2.2): one is /data, the other is the “internal” SD card. – Robert Siemer Nov 27 '13 at 02:40
  • did that yesterday, it didn't really clear much space, and when I checked today most my gallery photos are gone!! Was that related? – Magdi Gamal Dec 01 '13 at 16:07
  • 3
    How do I do the same thing on tablet that has NO dial pad and is also NOT rooted ??? – Jalle Dec 02 '13 at 23:18
  • Major +1. Easy solution to my problem! – Joris Van Regemortel Dec 25 '13 at 15:06
  • 1
    For me (hammerhead, API-19) the problem was the /data/app-lib/ contained the application package I tried to install. Remove and its fixed. – shkschneider Jan 24 '14 at 10:07
  • Great solution! I just freed 1,40GB in my S2. This was driving me nuts! – Luis Mar 17 '14 at 16:14
  • my sim is not detecting..and my nexus 5 is showing internal memory running out..i cannot dial that number..what is the way out? – huzefam Jun 23 '14 at 17:30
  • 1
    I want to do this! But I get _"Connection problem or invalid MMI code"_ on my Samsung Galaxy S2 running Paranoid Android 4.4.4. – Redsandro Nov 03 '14 at 17:30
  • Update:__ Nvm, upvoted answer below. Sorry for being impatient. – Redsandro Nov 03 '14 at 17:36
  • Not working for me. What about with different phone brand and model other than *Samsung*? – David Dimalanta Nov 25 '14 at 01:32
  • So it was logs and dumps after all. Thanks I just freed a staggering 1.3 GB on Galaxy SII. The phone was rooted though and it asked for superuser permission which i granted. – SarkarG Nov 24 '15 at 06:58
  • Perfect! I had only 40MB free and it ws decreasing day by day, but now I have 900MB free ! – user76758 Apr 04 '17 at 07:43
68

At first I tried Berislav Lopac's answer, but I got Connection problem or invalid MMI code. when I tried to dial *#9900#. I was using CyanogenMod on the phone, and I believe phones with custom ROMs don't use the stock dialer, so they lack the SysDump functionality.

Basically, Delete dumpstate/logcat in SysDump clears out the log files in /data/log. But you can also do this manually without SysDump. (This is assuming your phone has been rooted, which will be the case if your phone is running CyanogenMod or any other non-stock ROM.)

  1. Make sure Superuser and Terminal Emulator apps are installed. (They come with most custom ROMs.)
  2. Run Terminal Emulator
  3. Type in su, hit return.
  4. This will bring up a Superuser prompt. Grant access. (You will have to wait three seconds before you can click "Allow".)
  5. Change current directory by typing in cd /data/log, followed by return.
  6. MAKE SURE you are in the data/log directory by typing in pwd, followed by return. It should print out the present working directory you are in: /data/log. It is very important to make sure you are in the right directory as the next step removes all files in whatever working directory you presently are in.
  7. Remove all the files in the directory by typing in rm *, followed by return.
  8. Close the terminal window or app, or type in exit to leave the su session.

I deleted roughly 1,500 1 MB files like this and fixed my "Insufficient Storage Available" problem.

As with the other posters, I own a Galaxy S II, so it seems to be a problem with that model.

If anyone knows of the permanent solution to stop the log files building up, please let me know.

NOTE: Some file managers will falsely list /data/log to be empty as they are running unprivileged and hence lack the permissions to view the files inside.

Community
  • 1
  • 1
rhlee
  • 3,857
  • 5
  • 33
  • 38
  • Thanks, this was the first forum post that explained to me what to do when the *#9900# thing didn't work! I suspected it was CyanogenMod behind the invalid MMI issue but didn't know where to go from there. I'd also used ES File Explorer but it wasn't showing me the /data/log directory - presumably I'd forgotten to get it to view hidden files. – ChrisC Nov 14 '13 at 01:51
  • 2
    @Chris Chapman: As you are using CyanogenMod, you can use CyanogenMod's own file explorer called File Manager (blue folder w/ white arrow/circle). Go to Settings -> General Settings -> Access Mode in the app and change it to either Prompt User mode or Root Access mode (Prompt User mode is safer). You then should be able to then see the files in the /data/log directory. Also you will be able to bulk delete all the files. This method is easier, but deleting the files is slower. – rhlee Nov 14 '13 at 03:36
  • +1 ! I always see these kind of numbers `*#9900#`, `*#7832` but didn't work for me because of Cyanogen ROM. – S.Thiongane Jan 14 '14 at 11:44
  • 13
    Does this apply to CyanogenMod 10.2? Because I don't have a "/data/log" folder. "No such file or directory". – jonS90 Jan 26 '14 at 19:06
  • I had this issue a few month back, posted the cleanup steps, we can get it on a cron for a permanent workaround solution. – arntg Feb 05 '14 at 14:57
  • 7
    I have `/data/` and `/data/data/` and `/sdcard/data/` but none of these have a `log` subfolder – endolith Jul 27 '14 at 13:42
  • No, phones with custom roms usually use the *stock* dialer (AOSP is the only thing where "stock" makes sense"). And actually, it's an MMI code, which is independent (AFAIK) of the dialer used. – Jürgen A. Erhard Oct 22 '14 at 01:05
  • This worked. Cleaned 1GB on my S2 and I can finally update stuff again! – demonkoryu Jan 26 '15 at 13:30
  • Even if this freed space, I still cannot install any APK files =( – Metafaniel Dec 26 '18 at 22:55
19

The memory may be in reserve by the OS to be used for running what you normally run (kind of like a swap file). You may be able to squeeze in another app or two by

  • Trying to install them right after a restart, or
  • By force closing some apps that are running (but that second option may not be a good idea -- see the first link),

But the only very good fix might be to

  • Repartition your SD card so that apps can be installed directly to it (see the second link).

Take a look at forum post It was bound to happen: low memory warning!.

The important part is:

The OS knows how much memory it needs to run the apps you already have. This is a perfect example.

Now you may be able to "fool" the OS by force closing some apps that are sitting in RAM. This will increase your "bucket" of memory which may let you install an app, but remember if you do these types of things you will only cause issues down the road.. lagg, error messages, etc. (because you are fooling the OS in thinking you have given it additional memory which in fact you did.. you only force closed).

Another good explanation of what is happening is in forum post Low Internal Memory.

The important part is:

The reason why your internal space is filling up is 3-fold. First, when an app is "moved" to the SD card, it isn't completely moved. Only portions of it actually go. Second, the Dalvik cache of the app is still stored on the internal memory (which takes up a substantial amount of space). Three, the data for apps and all your system settings are stored in the internal memory (yes, some apps use the SD card for portions of their data, but every app has data stored on the internal memory).

And the thread includes suggestions on what partitioning you can do to your SD card to allow 'moar apps'!

mirh
  • 514
  • 8
  • 14
A.M.
  • 627
  • 2
  • 8
  • 18
  • @Sniper I would have pasted the SD card partitioning instructions too, but the sizes recommended are for a couple of years ago. Also, I wanted to strike a balance between (1) following StackOverflow's advice to paste things from other websites in case they become unavailable in the future, and (2) not completely robbing the source website of deserved traffic. :) – A.M. Jun 17 '13 at 14:04
  • 5
    According to http://androidforums.com/evo-4g-support-troubleshooting/128236-bound-happen-low-memory-warning.html#post1221086, "Uh, what? All of this is incorrect. The ROM area where apps are installed is not related to the RAM area where apps run/cache. Task Killer will free up RAM, not ROM. You will not be able to install more apps to that area by just killing them from running." (I think ROM is the wrong term, but still) – nafg Aug 20 '13 at 01:19
  • 1
    "ROM", Read-Only Memory, is not under discussion here at all. Every type of storage we are discussing is changeable, unlike ROM. What *is* being discussed is RAM and storage space, and even those concepts are blurred by the concept of swap space, in which one acts as the other. If you have other answers to post, that could be constructive, but arguments pointing to ROM seem much less so. – A.M. Sep 11 '13 at 01:39
  • 3
    This answer doesn't seem to be relevant. There are more helpful answers below. – Mr Ed Nov 18 '13 at 13:45
  • 1
    @A.M. You are completely off, here. ROM is the phone's internal storage (like a harddrive in a computer). RAM is the "scratchpad" that the CPU uses while it's working and where your applications are loaded while they are running. With all the solid-state storage, the term ROM has really been "muddied". It really comes down to two different types of "memory" 1) volatile memory (RAM) is fast and requires power to "store" things, meaning as soon as the device is turned off this memory is erased. 2) non-volatile memory (ROM) is where data is stored even with there is no power. – Mike U Feb 04 '14 at 21:56
  • To be absolutely fair, the `/system` partition is always mounted r/o. So if you aren't rooted, despite *physically* not being a ROM, it may as well be commonly. Also, \*perhaps\* Google may not have been enabling one of the "RAM zprojects" by default, but individual OEMs have all the freedom they want ([here](http://forum.xda-developers.com/showthread.php?t=2749849&page=239) you can see Samsung using it on slightly newer phones than OP's). This answer is actually the only halfway decent one, not being just a variant of "I found some extra file to delete and no shit I have more free space now". – mirh Nov 23 '20 at 23:15
13

The package manager (“installer”) has a design problem: it can’t distinguish between a bunch of possible errors and regularly comes up with the “insufficient storage” excuse.

The first steps are done: identify it’s an install problem (1.) and not related to storage shortage (2.)

  1. It happens on the console (pm install file.apk), with Google Play, other markets and manual GUI-install (for example, “clicking” on a downloaded APK file); it is not a download issue, ...
  2. Packages end up entirely on the /data partition -or- mostly on the SD card (and a little on /data). – Both places show enough space as indicated by the original poster (33 MB and >900 MB respectively) for the <20 MB package. –And– the /data partition has more than 10% free (33 MB is more than 10% of 200 MB).

Surprisingly most answers don’t take this into account...

In reality, the /data partition needs a cleanup from residues from previous installs.

  • Identify the common name of the problematic package (for example, com.abc.def)
  • Uninstall the package (for example, pm uninstall com.abc.def)
  • Check what’s left of it in data (for example, find /data -name 'com.abc.def*')
  • Delete that stuff

The installer chokes on those, returning with the wrong reason. – The interesting part is: if the package gets installed on the SD card (forced or by other means) some (all?) leftovers on /data don’t hurt... which leads to the false belief that it is indeed a space problem (more space on the SD card...)!

The Stack Overflow question where I got half of this from is Solution to INSTALL_FAILED_INSUFFICIENT_STORAGE error on Android.

Community
  • 1
  • 1
Robert Siemer
  • 32,405
  • 11
  • 84
  • 94
6

The first thing to do is to check the details of the error message. For this you could use the LogCat App.

For me the problem was an error like

Cannot rename native library directory /data/app-lib/vmdl-... to /data/app-lib/com.xyz

The solution was to activate the common sense function in my brain and look for the com.xyz folder in the app-lib folder with ES-Explorer. I recognized that this folder was already there. So removing it solved the renaming problem and the apps can now install properly.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sentenza
  • 1,269
  • 11
  • 24
6

The same problem was coming for my phone and this resolved the problem:

  • Go to Application Manager/ Apps from Settings.

  • Select Google Play Services.

Enter image description here

  • Click Uninstall Updates button to the right of the Force Stop button.

  • Once the updates are uninstalled, you should see Disable button which means you are done.

Enter image description here

You will see lots of free space available now.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
sjain
  • 23,126
  • 28
  • 107
  • 185
  • 1
    and you should do the same for every app, especially the ones from google. Don't forget to disable automatic updates of apps before. – GoTo Nov 29 '14 at 23:54
2

1. Restart the phone and then re-install the application!

I was also getting the same problem Insufficient Storage Available on my device, but I restarted my device, and it worked fine!

PS.:

2. Install application on external storage

For this, set Storage Location with the following command

adb shell pm set-Install-Location 2 // 2 for external storage ([SD card][1])

adb shell pm set-Install-Location 1 // 2 for internal storage 

adb shell pm set-Install-Location 0 // for auto
Community
  • 1
  • 1
Tarsem Singh
  • 14,139
  • 7
  • 51
  • 71
  • 2
    Thanks Tarsem! I tried Restarting more than 20 time but no luck.. :( – Sniper Jun 17 '13 at 10:57
  • 1
    Installing to sdcard avoids the problem, but doesn’t solve it (see my answer) –and– you can install a problematic package to sdcard easier like this: `pm install -s package.apk` – Robert Siemer Nov 09 '13 at 08:49
2

I also had this issue while installating an app after I had uninstalled that. I resolved downloading Lucky Patcher and then click on menu - troubleshooting - remove fixes and backups (insufficient storage available). Please notice you need your device to be rooted.

Federico
  • 521
  • 5
  • 13
2

I have an un-rooted Nexus 4 (which has only internal storage, no SD card) and was getting this error with larger apps updating. Smaller apps would update fine.

I discovered that it was because I have recently signed up to the Play Music All Access service and had pinned several albums.

These are downloaded to the hidden /data partition and it was this that had run out of space (I assume)

I unpinned a couple of albums and now have no problems installing apps.

Shevek
  • 3,869
  • 5
  • 43
  • 63
2

I had this problem even with plenty of internal memory and SD memory. This solution is only for apps that won't update, or have previously been installed on the phone and won't install.

It appears that in some cases there are directories left over from a previous install and the new app cannot remove or overwrite these.

The first thing to do is try uninstalling the app first and try again. In my case this worked for a couple of apps.

For the next step you need root access on your phone:

With a file manager go to /data/app-lib and find the directory (or directories) associated with the app. For example for kindle it is com.amazon.kindle. Delete these. Also go to /data/data and do the same.

Then goto play store and re-install the app. This worked for all apps in my case.

tomliddle
  • 51
  • 3
1

I had the same problem, and it was solved by using App Cache Cleaner.

(HT: acejavelin@Android Forums)

Shaul Behr
  • 36,951
  • 69
  • 249
  • 387
  • 1
    Actually, it isn't that silly. I have that problem in my Galaxy S2, and it had enough memory to install the app, and released about 87MB. But it didn't fix the overall problem though. – Mr Ed Nov 15 '13 at 15:48
  • Hmmmm. Maybe it DID fix my problem. I tried the suggestions in the answers to this question (install on sdcard, Dial *#9900# "Delete dumpstate/logcat", run Cache Cleaner) and initially it still didn't work, i.e. it got errors updating the existing apps (error 902 to be precise). But after the phone was rebooted, it managed to update properly! And now it seems to be ok. – Mr Ed Nov 18 '13 at 13:43
1

I tried several of the suggested solutions, but none of them worked for me. After some research I stumbled upon a hint to move some apps from /data/app to /system/app. That freed up enough space to install new apps and update existing ones.

I can recommend the free utility SystemCleanup for moving the apps.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Florian Feldhaus
  • 5,567
  • 2
  • 38
  • 46
1

This is the easiest thing to do. Go to settings look for storage or memory touch it and look for cached data. touch it and clear your data from there. SIMPLE!!!

Bhargav Modi
  • 2,605
  • 3
  • 29
  • 49
0

Does the app necessarily have to be installed in internal storage? If you are not running any service, you could try installing it on the external storage. This can be done by adding the following code in your manifest:

 manifest  
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:installLocation="preferExternal".....

This usually works on Android 2.2 and higher in most of the cases. Be sure that your app will work properly if it is installed on the external storage. You'll get a good idea on what kind of apps can be installed on external storage in App Install Location.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
MMss
  • 324
  • 3
  • 9
0

When it comes to areal device, the behavior of devices seem different to a different group of devices.

Some of the strange collection of the opinion I heard form different people is:

  • Restart your device after unplugging
  • Remove some apps from device and free at-least 100 MB
  • Try to install your app from the command line, ./adb install ~Application_path
  • Move your application to SD card storage or make it default in SD card in the Android manifest file, android:installLocation="preferExternal"
  • You got a lot of memory acquiring stuff in the Raw folder which installs a copy in phone memory while instating an APK file and the device doesn't have enough memory to load them
  • Root your device and install some good ROM which help to letting the device know about its remaining memory.

I hope one of them is relevant to you! ;)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
dharmendra
  • 7,835
  • 5
  • 38
  • 71
0

Most of the space you have available is reserved by the OS. The best and easy fix is to move your apps to external storage. This will free up a lot of space for you.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Riz
  • 6,746
  • 16
  • 67
  • 89
0

Some apps need to reboot to completely install. Android just says it has insufficient memory for some reason - it should say it needs reboot to complete the installation. Try it - it will install completely automatically when you reboot.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

I resolved this issue for myself. Though, the internal and SD memory was showing a lot of free space. It was an issue with phone memory, which was almost full.

Hence, I moved many of my apps from the phone memory to internal iemory, to free up the phone memory: Settings -> Storage -> Apps (under the internal storage section) -> Internal tab

Here are the ones which are not checked and that are occupying the space on the phone memory.

Click on the Apps (one by one) Click on the button: 'Move to Internal Storage'.

Once you free up a considerable amount of space on the phone memory this way, the error should not come.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

After uninstalling a few apps I'm able to install the new one...

I think OS calculates the total memory required to run all apps. If it doesn't fit then it says "in sufficient memory".

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
vkGunasekaran
  • 6,668
  • 7
  • 50
  • 59
0

I did not find a free solution that worked, but I found a solution: I used the non-free version of Titanium backup, clicked on the context button and chose to check the memory occupied by apps. Find the download app, and you will see that it has a certain amount of space allocated to its cache. Clear data is the option that you want.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
tony gil
  • 9,424
  • 6
  • 76
  • 100
0

Clearing the Google Play cache memory will also help you... Go to the app information page of Google Play and clear it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

If you have root, delete all of the folders on the path:

/data/app-lib/

And then restart your device.

I had this issue many times, and this fix worked for me each time. It even has an XDA thread.

I write all folders, because if there is a problem with one app, there is a good chance you have this issue with other apps too. Plus, it's annoying to find just the folders of the problematic app/s .

android developer
  • 114,585
  • 152
  • 739
  • 1,270
0

I had the same issue on Galaxy S4 (i9505) on stock ROM (4.2.2 ME2). I had free space like this: 473 MB on /data, 344 MB on /system, 2 GB on /cache. I was getting the free spate error on any download from Play Store (small app, 2.5 MB), I checked LogCat, it said "Cancel download of ABC because insufficient free space".

Then I freed up some space on /data, 600 MB free, and now it's working fine, apps download and install ;). So it seems like this ROM needs a little more free space to work OK...

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
George Dima
  • 2,707
  • 3
  • 17
  • 19
0

I got the same error message in case the package name was too long (>128 chars). Just using a shorter name fixed the issue.

reinra
  • 101
  • 1
  • 3
0

I had more than 2 GB internal space and yet I was not able to install / update applications either from Google Play or manually.

Whatever may be the reason, wiping the cache partition solved my purpose.

Steps: Recovery -> Wipe cache partition -> Reboot system now

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Saurabh
  • 93
  • 7
0

Go to Settings, Apps, All and uninstall Google Play Store. This will replace by the old version and then you can download without the "Insufficient Storage ERROR" It works for me

Carlos AG
  • 1,078
  • 1
  • 12
  • 16
-1

I kept having this problem, and I cleaned up the Dalvik cache using Titanium Backup. You'll need to have your phone rooted. As soon as I did that I was able to update Swiftkey and Beautiful Widgets.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
acciocode
  • 26
  • 1
  • 4