If you have installed Cydia on your iPhone or iPod Touch running 3.X firmware there is a good chance that after instaling a bunch of applications you could get to a point that you are running out of disk space on the root partition. By default the root partition is going to only be 500MB and so far I have not found a great way to resize this so it is much easier to resolve using the below method. Cydia does a pretty good job of relocating a lot of the folders from the root (mounted at /) partition to larger var partition (mounted at /private/var).

First you should find out how much disk space you have total and how much disk space you have left on the root partition of your iPhone or iPod Touch. You can do this by opening a terminal window on your iDevice or by connecting via SSH. Once you have connected either by terminal or SSH use the “df” command as shown below to list information about your disk space.

Find Out How Much Disk Space You Have On iPhone With Cydia:

narfTouch:~ root# df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/disk0s1 500M 409M 87M 83% /
devfs 19K 19K 0 100% /dev
/dev/disk0s2 30G 1.5G 29G 5% /private/var

As you can see in the above example I have roughly 17% space left in the root partition and 95% left in the /private/var partition.

When I first installed Cydia and installed many of the core Linux applications I got down to only have 3% disk space left on the iPod Touch so I wanted to free some up. I found the best way to do this was by moving the system fonts to the larger hard drive and then linking a folder on / to the new location. You can do all of this by issuing the below command from the jailbroken iPhone or Touch.

Free Disk Space By Moving Fonts On iPhone With Cydia Installed:

mv /System/Library/Fonts /private/var/; ln -s /private/var/Fonts /System/Library/Fonts

After this command completes you can see the symbolic link in the /System/Library directory by using the below command.
View Fonts Directory New Symbolic Link:

narfTouch:/System/Library root# ls -alh | grep Fonts
lrwxr-xr-x 1 root wheel 18 Oct 11 01:02 Fonts -> /private/var/Fonts/

This will free up 87MB of disk space on the root partition which is about 17.5% of the total disk space available. As mentioned above Cydia actually moves a lot of this stuff by default which you can see by checking out the root partition as shown below.

List Files & Directories On iPhone Root Partition:

narfTouch:/ root# ls -alh
total 21K
drwxrwxr-t 15 root admin 748 Oct 11 13:48 ./
drwxrwxr-t 15 root admin 748 Oct 11 13:48 ../
drwx------ 2 _unknown _unknown 204 May 22 04:08 .fseventsd/
lrwxr-xr-x 1 root admin 27 Oct 8 17:15 Applications -> /var/stash/Applications.pwn/
drwxrwxr-x 2 root admin 68 May 14 03:47 Developer/
drwxr-xr-t 16 root admin 782 Oct 9 01:34 Library/
drwxr-xr-x 3 root wheel 102 Jun 22 09:54 System/
lrwxr-xr-x 1 root admin 11 Oct 11 13:48 User -> /var/mobile/
drwxr-xr-x 2 root wheel 2.1K Oct 11 08:28 bin/
drwxr-xr-x 2 root wheel 68 Oct 28 2006 boot/
drwxrwxr-t 2 root admin 68 May 14 00:47 cores/
dr-xr-xr-x 3 root wheel 750 Oct 11 13:48 dev/
lrwxrwxrwx 1 root wheel 12 Oct 8 17:15 etc -> private/etc//
drwxr-xr-x 2 root wheel 68 Oct 28 2006 lib/
drwxr-xr-x 2 root wheel 68 Oct 28 2006 mnt/
drwxr-xr-x 4 root wheel 136 Jun 22 16:36 private/
drwxr-xr-x 2 root wheel 1.6K Oct 9 02:08 sbin/
lrwxrwxrwx 1 root wheel 16 Oct 8 17:15 tmp -> private/var/tmp//
drwxr-xr-x 10 root wheel 442 Oct 11 07:30 usr/
lrwxrwxrwx 1 root wheel 12 Oct 8 17:15 var -> private/var//

After you have moved the Fonts directory you should not have any further disk space issues with the root partition because most items such as applications are already going to be installed on the larger partition.

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , , ,
18 Responses to “iPhone 3.X Firmware With Cydia Installed Running Out Of Disk Space”
  1. Melmoth says:

    Hi!
    After I tried this trick, my Ipod started rebooting over and over!!! I even tried to restore again with redsnow, but it didn’t worked…
    What can I do?

    [Reply]

    alex Reply:

    Hello Melmoth,

    This could mean that you fat fingered one of the commands or it is possible somehting else went wrong. Maybe you were running version of Cydia where something has changed. Anyhow if you are unable to get the device to stop rebooting then you will have to put it into DFU mode, reinstall the apple software, restore from a backup, get cydia working again, and then make any modifications made after cydia was install (restore here if you have a backup). Here (click here) is an article relating to this type of issue on a 2G iPod Touch but the concept is the same for other versions as well.

    Thanks.
    alex

    [Reply]

  2. Melmoth says:

    Thank you ;)
    Restoring to original firmware did the trick. Anyway it was a long trip!
    I remember Bosstools was able to free some space in system partition, but it seems it is not installable in firmware 3.0…

    [Reply]

    alex Reply:

    Hello Melmoth,

    No problem. Glad you got it taken care of. Yeah I wrote the above article because I had a jailbroken iPod Touch that I wanted to free some space on. It worked like a charm and I have not run into any disk space issues since.

    Thanks.
    alex

    [Reply]

  3. Richard says:

    Found out for myself and applied without problems on 3.1.2
    UNIX is that great for reverse engineering!
    The trick worked as well with
    /System/Library/TextInput

    Apple is said to reduce /dev/disk0s1 on latest firmware to make jailbreaking harder. Hah!

    [Reply]

    alex Reply:

    Hello Richard,

    Thanks for the info! The iPod Touch that I did this with I have kept on 3.1 software so I will keep the above in mind when I finally upgrade it. Anyway thanks again.

    Thanks.
    alex

    [Reply]

  4. Paul says:

    I tried the same, however it throws error “cannot move ‘blahblah’ to ‘blah blah’: Permission denied. Wont create the link either; Permission denied.

    [Reply]

    alex Reply:

    Hello Paul,

    Are you logged in to your iPhone or iPod Touch as the root user? If you are could you paste the exact error which may help us lead you to resolution.

    Thanks.
    alex

    [Reply]

  5. Steven says:

    works like a charm! Thank you so much

    [Reply]

    alex Reply:

    Hello Steven,

    No problem. Thanks for taking the time to leave feedback.

    Thanks.
    alex

    [Reply]

  6. Bokusama says:

    So why not just move it all to the 2nd partition? Speed?

    [Reply]

    alex Reply:

    Hello Bokusama,

    I don’t believe its safe to symlink everything. The idea is to make just enough room so you don’t have to worry about running out of space with the minimal amount of items symlinked.

    Thanks.
    alex

    [Reply]

  7. Kyle says:

    You made a typo under “Free Disk Space By Moving Fonts On iPhone With Cydia Installed:”. It’s supposed to be /private/var/Fonts not /private/var/Font

    [Reply]

    alex Reply:

    Hello Kyle,

    I couldn’t find the typo… maybe it was the fact that the code postings had a box that dropped down to allow for copying the source, etc. I removed those drop down boxes so if you still see the typo let me know and I will be happy to fix. Thanks for taking the time to point that out.

    Thanks.
    alex

    [Reply]

  8. Luca says:

    Well, thank you so much. Was looking for this for a couple hours now. First heard of BossTools, but then found out it was outdated. Then heard of SBSettings, but I’ve found out it doesnt actually does this kind of thing (of, if it does, I didnt figure how to). In the end, I was back into looking for command line tutorials. Made it through SSH and everything worked just fine! :)

    Btw, just by moving the Fonts, the new Apps will automatically be installed on the 2nd partition? You’ve said that, but I dont get it how it’s gonna happen, since all I did was to move the Fonts. In my mind, it would require further commands, wouldnt it?
    Anyways, thanks again!

    [Reply]

    alex Reply:

    Hello Luca,

    What I was relaying is that the Applications are actually already installed on the larger partition thus installing new apps won’t cause any further problems.

    Thanks for taking the time to leave feedback.

    Thanks.
    alex

    [Reply]

    Luca Reply:

    Oh, ok, got it now! Thanks :)

    [Reply]

    alex Reply:

    Hello Luca,

    No problem. Thanks for taking the time to leave feedback again. :)

    Thanks.
    alex

    [Reply]

  9.  
Leave a Reply

*Type the letter/number combination in the abvoe field before clicking submit.

*