Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Free up space - Remove unused images

  1. #1
    Default Free up space - Remove unused images
    Free up some space on your device by deleting some unused images. Idea from fasoaga.

    I've put it all in a nice friendly script for y'all. Customize it, use it (If you don't know how, you probably should stick to the one liners below)
    usage: imgrm <top path to delete from>

    Code:
    #!/bin/bash
    #Usage: imgrm <path>
    
    #Answer with YES or NO
    #Pre-Customized the script?
    CUSTOM=""
    #Remove retina display images?
    RMREGULAR=""
    #Remove non-retina images? (of retina counterparts)
    RMRETINA=""
    #Remove images with HD at the end?
    RMHD=""
    #Remove images with "iPad" at the end?
    RMIPAD=""
    
    if [ "$1" == "" ]; then Path="/" ; fi
    
    if [ "" != "YES" ]; then 
    	echo "The script isn't customized. Please customize first."
    fi
    
    if [ "" == "YES" ]; then 
    	find  -iname *@2x.png -exec echo {} + | sed 's/ /n/g' | tr -d '@2x' | xargs rm -f 
    fi
    
    if [ "" == "YES" ]; then 
    	find  -iname *@2x.png  -delete
    fi
    
    if [ "" == "YES" ]; then 
    	find  -iname *ipad.png -delete
    fi
    
    if [ "" == "YES" ]; then 
    	find  -iname *HD.png -delete
    fi
    
    exit
    Remove all non-retina images on retina devices (only with retina counterparts)
    Code:
    find / -iname *@2x.png -exec echo {} + | sed 's/ /n/g' | tr -d '@2x' | xargs rm -f
    Remove all images for iPad on devices which aren't iPads
    Code:
    find / -iname *ipad.png -delete
    Remove all images which have HD at the end of the filename (Careful if you own a retina display device. These images are USUALLY iPad images.)
    Code:
    find / -iname *HD.png -delete
    Remove all retina images on non-retina devices
    Code:
    find / -iname *@2x.png  -delete
    Last edited by j3st3r; 12-10-2010 at 11:56 PM. Reason: removed pirated app repo name

  2. The Following User Says Thank You to Bunniesandsheep For This Useful Post:

    143voltron (12-13-2010)

  3. #2
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    this is extremely confusing. anyone that wants to no how to use it, this is how. dont use the huge one i dont understand that one, use the one liners, put them all in /var/mobile/. heres and example of the one that deletes retina images.

    find /(put the destination here, example)(var/mobile/applications/$) -iname *@2x.png -delete
    Last edited by Maxhasadhd; 12-11-2010 at 01:17 AM.

  4. #3
    Didn't see your post, actually I saw someone asking on another forum and wrote this quickly. It's far too unpolished to go on cydia. If it looks confusing for you, you should probably use the one liner commands. To do that:

    1: Get mobileterminal (or another iDevice ssh client) or PuTTY if you want to do it from your PC.
    2: Enter one of the commands into terminal, and press enter.

    Be careful, these commands cannot be undone.

    Quote Originally Posted by Maxhasadhd View Post
    this is extremely confusing. anyone that wants to no how to use it, this is how. dont use the huge one i dont understand that one, use the one liners, put them all in /var/mobile/. heres and example of the one that deletes retina images.

    find /(put the destination here, example)(var/mobile/applications/$) -iname *@2x.png -delete
    For best usage, dont put a path. Leave it as /. This means it'll scan everything on your iPhone (using any of the one liners in terminal will scan the whole device.)

    Also, FYI, $ signs come before a variable. * signs mean wildcard (ie: anything). If you reay want to put a path in, you don't need the wildcard, just put a folder name.
    Last edited by Bunniesandsheep; 12-11-2010 at 05:16 AM. Reason: Automerged Doublepost

  5. #4
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    Oh lolz i didnt no that i just look through scripts and i thought it meant something else haha

  6. #5
    iPhone? More like MyPhone
    Join Date
    Oct 2009
    Location
    Chicagoland
    Posts
    106
    Thanks
    5
    Thanked 10 Times in 10 Posts

    Did you happen to make note of how much space each of these "one liners" freed up for you?

  7. #6
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    It duznt work good:/ my 3gs lost 0 and my i4 gets a error and it is done right

  8. #7
    I have a ipt2g. Deleting all retina images freed up 50mb for me. Deleting all iPad images cleared another 15mb.

    @Maxhasadhd: I don't know what your issue is, because they work fine for me. What error did you get?

  9. #8
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    i get something like somethings too big? hold on ill go do it right now

    i did it.. it comes up a long coe and the last line is.. file name too long
    Last edited by Maxhasadhd; 12-11-2010 at 06:31 PM.

  10. #9
    What is the command that you are using, character for character?

  11. #10
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    find / -iname *@2x.png -exec echo {} + | sed 's/ /n/g' | tr -d '@2x' | xargs rm -f

    iv used this one and
    find /system/library/privateframeworks/webcore.framework -iname *@2x.png -exec echo {} + | sed 's/ /n/g' | tr -d '@2x' | xargs rm -f

  12. #11
    So, I'm assuming you have a retina device. First off, try:

    find /User/Applications -iname *@2x.png -exec echo {} + | sed 's/ /n/g' | tr -d '@2x' | xargs rm -f

    Also, be careful with your paths, make sure that they're capitalized correctly. Did you copy.paste the command?

    Could you copy /all/ the terminal output you get and post it here if it doesn't work again?
    My Devart: http://bunniesandsheep.deviantart.com/
    Ipod touch 2g, 8gb, 3.0, with qTweeter, multifl0w, SBSettings, virtual RAM, Backgrounder and all the other useful jailbreak apps.
    If you need photoshop help, pm me =]

  13. #12
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    i cant copy it.. and its really long.. and i copied the place where it was located.. ill try ur code

  14. #13
    You can copy it if you use a desktop terminal client, like PuTTY. You just connect it in the same way that you connect winSCP
    My Devart: http://bunniesandsheep.deviantart.com/
    Ipod touch 2g, 8gb, 3.0, with qTweeter, multifl0w, SBSettings, virtual RAM, Backgrounder and all the other useful jailbreak apps.
    If you need photoshop help, pm me =]

  15. #14
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    kk im sending it ina message

    nvm its wayyyyy too long 54000 and after now i get error code 123 or 124 and it says file name too long

    another one i just got was " 123 connot delete"

    find /System/Library/PrivateFrameworks/WebCore.framework -iname *@2x.png -exec echo {} + | sed 's/ /n/g' | tr -d '@2x' | xargs rm -f
    Last edited by Maxhasadhd; 12-11-2010 at 08:47 PM.

  16. #15
    Huh. That's weird. And you're copying and pasting the command? What size is your iDevice?
    My Devart: http://bunniesandsheep.deviantart.com/
    Ipod touch 2g, 8gb, 3.0, with qTweeter, multifl0w, SBSettings, virtual RAM, Backgrounder and all the other useful jailbreak apps.
    If you need photoshop help, pm me =]

  17. #16
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    16gb

  18. #17
    I have a 3g ios 4.1 and I want to use mobile terminal, what is the correct one liner to use?

  19. #18
    I did a search in iFile for "ipad" (I'm on a 3g 3.1.3) and I found a few "ipad.nib" for apps like Netflix, Pandora and Remote (e.g. MainWindow-iPad.nib) would these be safe to remove as well???

  20. #19
    iPhoneaholic
    Join Date
    Sep 2010
    Location
    California
    Posts
    345
    Thanks
    2
    Thanked 11 Times in 8 Posts

    Idk how to use. Ok wait do we put into a script or just a command in terminal? I did both n both hate me

  21. #20
    Remove all images which have HD at the end of the filename (Careful if you own a retina display device. These images are USUALLY iPad images.)

    Code:
    find / -iname *HD.png -delete

    Remove all retina images on non-retina devices

    Code:
    find / -iname *@2x.png -delete

    i used these 2 for my 3g ios 4.1 and it work
    thanks

Page 1 of 2 12 LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •