mas
mas copied to clipboard
Search doesn't find previous macOS releases
Neither of the following returns the actual OS downloads, but rather just some junk apps:
mas search Yosemite
mas search "El Capitan"
mas search Lion
This isn't a bug, mas only finds apps that are "available for purchase" on the app store. Older versions of OS X are not "available for purchase" any more. They are only visible in the "purchased" tab of people who already bought them when they "were available".
That isn't the case for macOS Sierra and newer. Those don't appear in the purchases tab any more, for anyone. They can only be downloaded "at the time of availability".
Ok but since I did "purchase" them in the past I still would like to be able to download them. But since search isn't showing any results I have no idea how to get their IDs.
Just go download them. They are still in your Purchases tab of the App Store. The only one that isn't is Sierra, and I downloaded that using an ID just a week ago. I'll see if I can dig up the ID.
Sierra is 1127487414.
Thanks, however I was trying to use mas
in an automated CI setup so manually downloading isn't an option.
Ok, So download them manually and run "mas list" to get their IDs. Then you have an archive of them, and their IDs.
ID = 1127487414
didn't work for me.
Probably because
Please note that this command will not allow you to install (or even purchase) an app for the first time: it must already be in the Purchased tab of the App Store.
As stated here.
Not a bug of mas utility ofc.
But we still can download macOS Sierra via AppStore https://itunes.apple.com/us/app/macos-sierra/id1127487414?mt=12 I wonder for how long 🤔
Sounds like this might be related to #82. OS installers need some special handling.
Been doing some digging and MAS GUI also hides older macOS versions. In some cases (like recent versions), they can still be accessed from the "Purchased" tab but this seems to be a bit buggy as some didn't show for me until I found the direct download links. Here they are for posterity:
-
10.13 High Sierra (id
124628474
) -
10.12 Sierra (id
1127487414
) -
10.11 El Capitan (id
1147835434
) -
10.10 Yosemite (id
915041082
) -
10.9 Mavericks (id
675248567
)
💡 Note that once you have the IDs these can be installed through mas.
So, I'm changing this issue to a feature request to add special handling for macOS installers.
So i cant download mavericks and yosemite from mas 1.7.0. When i write mas purchase and then mavericks’s app id, it says item is not available. So i guess there is no way to download mavericks and yosemite from the app store?
Relevant, but it seems only useful for recent releases:
caraman@mac ~/s/mas (main)> softwareupdate --help
usage: softwareupdate <cmd> [<args> ...]
** Manage Updates:
-l | --list List all appropriate update labels (options: --no-scan, --product-types)
-d | --download Download Only
-i | --install Install
<label> ... specific updates
-a | --all All appropriate updates
-R | --restart Automatically restart (or shut down) if required to complete installation.
-r | --recommended Only recommended updates
--list-full-installers List the available macOS Installers
--fetch-full-installer Install the latest recommended macOS Installer
--full-installer-version The version of macOS to install. Ex: --full-installer-version 10.15
--install-rosetta Install Rosetta 2
--background Trigger a background scan and update operation
** Other Tools:
--dump-state Log the internal state of the SU daemon to /var/log/install.log
--evaluate-products Evaluate a list of product keys specified by the --products option
--history Show the install history. By default, only displays updates installed by softwareupdate.
--all Include all processes in history (including App installs)
** Options:
--no-scan Do not scan when listing or installing updates (use available updates previously scanned)
--product-types <type> Limit a scan to a particular product type only - ignoring all others
Ex: --product-types macOS || --product-types macOS,Safari
--products A comma-separated (no spaces) list of product keys to operate on.
--force Force an operation to complete. Use with --background to trigger a background scan regardless of "Automatically check" pref
--agree-to-license Agree to the software license agreement without user interaction.
--verbose Enable verbose output
--help Print this help
caraman@mac ~/s/mas (main)> softwareupdate --list-full-installers
Finding available software
Software Update found the following full installers:
* Title: macOS Big Sur, Version: 11.3.1, Size: 12411305377K
* Title: macOS Big Sur, Version: 11.3, Size: 12425084347K
* Title: macOS Big Sur, Version: 11.2.3, Size: 12211077798K
* Title: macOS Big Sur, Version: 11.2.2, Size: 12200254955K
* Title: macOS Big Sur, Version: 11.2.1, Size: 12199403070K