Downloading installer packages from the Mac App Store with AppStoreExtract
As part of my work, I occasionally need to download installer packages for certain applications from the Mac App Store. In particular, I routinely download and archive certain Apple applications from the MAS to guard against the possibility that Apple will remove older versions of a particular application that I still need to have available.
A tool that has helped me with this has been Max Schlapfer‘s AppStoreExtract script. This script is designed to make copies of the installers from the Mac App Store, and is able to handle multiple installer downloads at once.
AppStoreExtract is available from GitHub at the following address:
https://github.com/maxschlapfer/MacAdminHelpers
For more details on how to download installers from the MAS using AppStoreExtract, see below the jump.
1. If needed, download the AppStoreExtract script and store it in a convenient location.
2. Once the AppStoreExtract script is available, open the Mac App Store and sign in with the appropriate Apple ID for the applications in question.
3. Open Terminal and begin running the script.
Note: Run the script with the logged-in user’s privileges. Do not run this script with root privileges, as the script will not locate the appropriate Mac App Store download folder when running as root.
4. You’ll be notified that you can press any key to finish the process once the software has been downloaded from the MAS.
5. Go to the Mac App Store’s Purchased list.
6. Click the Install button for the desired application(s).
7. Wait for the MAS to complete installation of all the desired applications.
8. Go back to Terminal and press any key.
9. When prompted to finalize the packages, press the Y key followed by the Return key on your keyboard.
10. The script will rename the downloaded installers to match the application name and version, then create a disk image with the installer package contained inside.
11. The disk images will be stored in /Users/Shared/AppStore_Packages
These downloaded installers will be signed with the Mac App Store’s certificate. From there, you can use it on its own or as part of a deployment workflow.
When the applications in question are installed on a Mac using the downloaded installer package, there will not be a _MASReceipt from the App Store included as part of the application. This means that the applications are not tied to a specific Apple ID.
Thanks for this great tutorial! Very handy.
You can also use this tool to capture update packages by going to the Updates tab instead of the Installers tab, but of course it will only serve you the diff between the previously installed version and the new one.
How would removing the _MASReceipt be of any use? I can understand that this (probably) works for keeping older versions of freeware that you downloaded from the AppStore—and I do think that’s a great option—, but in your example (in the image above) you’re downloading Keynote, Numbers & Pages: these are apps you need to pay for, so they will only run when they’re linked to your AppStore account, or any other AppStore user who’s a registered buyer of those apps. Or am I missing something?
Your readers should also note that removing the _MASReceipt might be illegal in their respective countries; it is illegal in Germany… as long as it’s for personal and private use (incl. copies for family & close friends) it’s not enforced by penalty, but it’s still de facto illegal.
This is beyond awesome, thanks!
Holy wah! This is awesome. Thanks Rich, and Max!
Developer Max kindly added a method (just add argument -m, like ‘AppStoreExctract.sh -m’) for saving the package file formatted as “KeyNote-6.6.1.pkg” as this is much more munki-friendly way of naming the packages.
In any apps, I take the message that the app is damage. (after installation the dmg). I try it on different clients.
THIS IS AMAZING. HOLY WOW. hey thanks.
This is excellent. I haven’t been using this extract script long enough to test what happens when there’s an update to the app that I’ve packaged using that method. Does the App Store recognize there’s an update?
Because it is not tied to an Apple ID, it will not automatically update via the App Store.
Dear All – all apps installed using the extracted dmg file are receiving the message that suggest the application is damaged. Any one else get this? Any suggestions on how to resolve this?
To piggy back on sunlite’s question – recently I’ve been getting a “find: /var/volders/zz/zyxvpxv16cs (omitted for space): No such file or directory”. I’ve used this wonderful script with success in the past but now I get this. Any ideas? Or has Apple gotten wise and shut it down?
Same here 😦
looks like apple got wise and shut it down
Still working fine here.
If you try to run this script on Mojave, you’d have to add “sh” before command (example $ sh AppStoreExtract.sh)
I have been using AppStoreExtract.sh for some time. This week I am rebuilding a computer and tried to run the old package (specifically Numbers and Pages) from the file that was saved from AppStoreExtract. The installer package runs fine and everything completes successfully, however when I go the Applications folder the installed app is not present.
While I have been saving these install packages for a while, this is the first attempt to use them and I am on a Mojave 10.14.3 system.
Any suggestions as to what I am doing wrong.
I just tested it with an extracted app, and the installation using the pkg works fine. If it doesn’t work in your case, instead you could try to use the freeware “Suspicious Package” by Mothers Ruin Software to manually extract the app (with root privileges) into the /Applications folder.
I guess my first question is what version of MacOS are you running on?
After I attempted installation from the saved dmg from AppStoreExtract, I did notice that in System Information (System Report) > Software > Installations it did show that the package was installed (actually multiple times, as I tried multiple times). I also ran the log file (Command L) during installation and didn’t see anything overly odd during the installation, but I could not examine the tmp files as they are deleted about as fast as they are created once you tell the Installation GUI to Install. However, in System Information (System Report) > Software > Applications the app simply did not show.
I am familiar with “Suspicious Package”. I picked one of my problem dmg files and exported it with Suspicious Package. When I tried to start the app the OS reported that the app was damaged and needed to be deleted immediately.
These previous attempts to load an app saved with AppStoreExtract where from a different computer, but it was also running Mojave. So I tried Suspicious Package export on a AppStoreExtract package that I freshly captured yesterday on my new computer and I had no problem running the app from the Applications Folder.
It seems hard to imagine that all the old AppStoreExtract packages I tried to load (and failed) in the last week were damaged, but I guess anything is possible. So, I went back in time with Time Capsule and restored the original AppStoreExtract download for the file I have been working with from the other computer. Using Suspicious Package to export, it also started up with the file is damaged message.
At this point I am beginning to believe that I have a bunch of bad App Store Extracts. With yesterdays fresh download extract working fine I assume I simply have to re-download everything fresh and capture a clean AppStoreExtract as I do so.
Thank you for your input.
I just wanted to close the discussion I started. Going under the assumption that the extracts that I had were bad packages, I went back to my main download computer and re-did the AppStoreExtracts. This time I took the advice from Naveed Abbas and assured I used the command “$ sh AppStoreExtract.sh”.
After I copied the extracted files to another system, they installed fine.
In looking back, I have no understanding as to what might have been wrong with the old files. Looking forward I know it works great and I am thankful that Max Schlapfer put this out there for us to use.
FYI this wasn’t working on Catalina, but if you do a brew install of mas-cli to do command line installations of app store apps, it works perfectly. Download your app from the app store, then delete it using the regular MacOS app store interface. Run the AppStoreExtract.sh script in one terminal window. In another terminal window, use mas to search for the app and re-download/install it (instructions here: https://github.com/mas-cli/mas). Then finish using the extract app as described here.
Thanks E7 ! Works well with mas-cli on Catalina.
I am currently running on Catalina 10.15.3. This week I noticed an update in the Mac App Store, so I have set my system up to use mas-cli.
I was all set to execute with the mas-cli method on my Macbook Pro when I did a “mas list” and the app that is showing in the Mac App Store as having an update is not even showing in the “mas list” list. All other Mac App Store installed apps are present in the “mas list” output.
Since it is not showing in the “mas list” there is no action when I attempt to do a “mas outdated”.
Today, I noticed another (different) app on my Mac Pro that needed updating on the Mac App Store and again, when I went to run “mas outdated” it shows no output, but with “mas list” the last installed version does show in the output.
There must be something that I have done wrong… any suggestions? mas was installed using the mas.pkg method.
I understand why I saw the behavior I mentioned.
Once you update an installed package using a saved update dmg file, It disappears from the “mas list” response on that computer.
If you designate one computer as the source for capturing/downloading all the update files, then “mas list” on that computer should remain current and correct.
AppStore Extractor Script was working for me for a years, giving me installation packages to deploy latest versions…
Any chance we get it working again in Catalina, please? 🙂
its not working with Catalina… is there other way to do this???
18 Feb 2021
The way that E7 suggestion still working on Catalina, Many Thank
Thanks E7, excellent solution!
Any ideas why I get this error on Catalina 10.15.7 ?
The packages will be converted into dmg files. This could take a while.
creating /Users/Shared/AppStore_Packages/*.dmg
hdiutil: create failed – No such file or directory
rm: /Users/Shared/AppStore_Packages/*.pkg: No such file or directory
I can’t seem to make it work because Garageband isn’t on my ‘Purchased’ list. I need to download an older version to work on Mojave. Is it possible with the script? It seems to execute in Terminal
I tried it on OS X 10.11.6 El Capitan and I am getting the same error as robbo007
hdiutil: create failed – No such file or directory
rm: /Users/Shared/AppStore_Packages/*.pkg: No such file or directory
Has Apple intentionally broken this?
This tool still works if you use the “mas-cli/mas” from command-line. It’s available at https://github.com/mas-cli/mas
Use the command “mas search ” to find the AppStore APP ID by name.
Run the AppStoreExtract from Terminal.
Use the command “mas install ” to download and install it.
Press Enter on AppStoreExtract (Terminal) and finalize the package. It will be created as expected.
Any update on the “is damaged and can’t be opened” error? I’ve tried to dump and reinstall the packages on Mojave and none of them works. I’ll get “xxx is damaged and can’t be opened. Delete XXX and download it again from the App store” for any single file.