Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Firmwhere: A Shell Script to List and Download All Current and Previous iOS and iPod Software Updates From Apple
## The first part filters the XML file on Apple's Update Server that iTunes checks with when looking for iOS and iPod software updates, filtering and displaying only the URLs and saving them to a text file in /var/tmp/firmwhere.txt
curl | grep ipsw | grep -v protected | grep -v Recovery | sort -u | sed 's/<string>//g' | awk '{$1=$1}1' | sed 's/<\/string>//g' > /var/tmp/firmwhere.txt
## If necessary, you can download *all* available software updates by uncommenting the command below. Make sure to change directory to the one you want to download to first or edit the command appropriately. It will just loop through the text file and using cURL, will download all iOS and iPod software updates.
##If you have wget installed, uncomment the second line instead to use wget and it will skip any updates downloaded. Again, change directory to the one you want to download to or edit the command.
## Using cURL
## for i in `cat /var/tmp/firmwhere.txt`; do curl -O $i; done
## Using wget
## wget -m -nd -i /var/tmp/firmwhere.txt
Copy link

jordanmerrick commented Aug 24, 2012

I decided to publish a small shell script I wrote a while ago from my days needing to regularly access and download iOS and iPod software updates. It’s useful if you regularly restore and update iPods and iOS devices, need to jailbreak a device or just generally see what updates are available.

I would regularly need to ensure some MacBooks had all available iOS and iPod software updates so that no matter what device would be connected, we’d have the latest software. Having the older ones wasn’t as useful, but occasionally I’d need to restore an iPhone running iOS4.

The script will first output all available software update download URLs to a text file, allowing you to select the one you want to download. The script also contains download commands for both curl and wget if you want to download them all.

Copy link

Elefontman commented Feb 26, 2016

Question: can we add the ability to dl beta IOS's?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment