How to List All IPSW Files from Apple Servers Using the Command Line
Many advanced users prefer to use firmware files when updating their iOS devices to the latest version, and every time an iOS update comes out we post direct download links for the latest versions. Every once in a while we get questions from users who wonder how we find those file links, since they’re tucked away on Apple’s download servers, seemingly hidden from the public view. Well, there isn’t any magic to this and it’s easily done through the command line with a simple trick that pulls a full list of IPSW files that are available directly from Apple. At it’s most basic form it lists literally everything, but with some minor changes to the command syntax you can sort for specific iOS versions or for files that match a specific piece of hardware.
This likely won’t be useful to everyone, but for users who like working with IPSW, or for systems administrators who need to download a bunch of different firmware files to perform bulk updates on a bunch of hardware, this should be helpful. For everyone else, it can be a lesson to further prove we at osxdaily are nerds who spend too much time thinking about this stuff.
If you’re going to try these yourself, copy the full syntax block and paste it into the command line. The commands look broken apart on the web, but they should paste fine into the command line as a single command string on a single line.
Get a List All IPSW Files for All iOS Devices from Apple
The following command string returns a fairly clean list of quite literally every single IPSW file for every iOS device, iPad, iPhone, iPod, you name it, hosted by Apple’s servers:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g' | grep -v protected
To walkthrough the syntax, curl is accessing the “version” list from Apple’s server URL (this is the same URL that is hit by iTunes when it detects an update is available, by the way). That list is then passed through the grep command to match for “ipsw” but discount ‘protected’, sort -u makes sure the returned list items is unique, and finally, the results are passed through ‘sed’ to clean up some useless XML from the results. Executing that command just dumps everything to the command line, you can pass it through ‘more’ to make it more readable, or perhaps preferable to some users is to redirect it into a text file like so:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g'| grep -v protected > ~/Desktop/ipswlist.txt
That will dump everything into a text file named ‘ipswlist.txt’ on the desktop.
Get a list of all iPhone IPSW files from the command line
Don’t care about the other iOS files and just want a list of iPhone IPSW? Use grep for iPhone and the rest of the command stays the same:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | grep iPhone | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g' | grep -v protected
Add “> ~/Desktop/iPhoneIPSW.txt” to the end to send the results to a text file on the desktop.
Retrieve a list of all iPad IPSW available on Apple’s Servers
Similar to using grep to search for iPhone, specifying ‘iPad’ will return only iPad firmware files instead:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | grep iPad | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g' | grep -v protected
As before, you can send that into a text file if desired by adding “> ~/path/to/text.txt” to the end.
Get a list of only a specific iOS version from Apple
Similar to searching for specific iOS hardware, you can also return specific iOS versions if desired. For example, the following syntax will only return all IPSW results that match iOS 7.0.4, noted by that version string in the second grep:
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | grep 7.0.4 | sort -u | sed 's/<string>//g' | sed 's/<\/string>//g' | grep -v protected | awk '{$1=$1}1'
Apple is quick with pushing out updates and because of the Over-the-Air mechanism most people notice new updates almost right away when they become available. Nonetheless, some users use a variation of the above trick to monitor for new iOS releases by periodically querying for various version strings that do not yet exist on Apple’s servers. That’s a bit beyond the scope of this article though.
There may be cleaner and/or better ways to do this, chime in the comments if you have another solution.
Having xDelta patches from the previous IPSW file to the newest will be nice. That will save us from downloading over 5GB every one or two weeks if we want to be always up to date.
Hey, any chance you know the link to Apple’s server that hosts the beta firmware links aswell?
I have had a script doing this for a while now up at :
https://github.com/Macdeviant/iOSautoDownload/blob/master/Oldcheck.sh
I’m currently working on using curl to do the downloading instead.
It does a diff on the previous check of http://phobos.apple.com/versions
< this redirects to the latest xml.
Hi Craig,
Is this script currently operable, I currently work for a company which could make great use of this.
It would be recommended to use the “sort -u” at the end of the filtering (just before output). Sorting is really expensive.
curl http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/com.apple.jingle.appserver.client.MZITunesClientCheck/version | grep ipsw | grep -v protected | sed -e “s///g” -e “s///g” | sort -u | grep iPad
Do you know how to remove the tabs from the front of every line ?
any chance to automatically download all the latest ipsw files?