mas-cli / mas

:package: Mac App Store command line interface
MIT License
10.84k stars 273 forks source link

Search doesn't find previous macOS releases #106

Open ulope opened 7 years ago

ulope commented 7 years ago

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

Basilmir commented 6 years ago

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".

ulope commented 6 years ago

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.

JohnSlaughter commented 6 years ago

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.

JohnSlaughter commented 6 years ago

Sierra is 1127487414.

ulope commented 6 years ago

Thanks, however I was trying to use mas in an automated CI setup so manually downloading isn't an option.

JohnSlaughter commented 6 years ago

Ok, So download them manually and run "mas list" to get their IDs. Then you have an archive of them, and their IDs.

8of commented 6 years ago

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.

8of commented 6 years ago

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 🤔

phatblat commented 6 years ago

Sounds like this might be related to #82. OS installers need some special handling.

phatblat commented 6 years ago

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:

💡 Note that once you have the IDs these can be installed through mas.

screen shot 2018-03-20 at 7 20 25 pm

So, I'm changing this issue to a feature request to add special handling for macOS installers.

phatblat commented 5 years ago

One more for the list:

Red1860 commented 4 years ago

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?

chris-araman commented 3 years ago

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
rgoldberg commented 3 weeks ago

Can we close this?

macOS installers back to 10.13.x (see end of comment) seem to be able to be installed via:

softwareupdate -fetch-full-installer --full-installer-version <version>

Should mas really be trying to support installing macOS versions that were EOL 5+ years ago?

Should mas really be trying to provide a second way to install newer macOS versions when Apple already provides an official way to do it?

The following was run from an older Mac that can only support up to Monterey:

softwareupdate --list-full-installers
Finding available software
Software Update found the following full installers:
* Title: macOS Monterey, Version: 12.7.6, Size: 12118346KiB, Build: 21H1320
* Title: macOS Monterey, Version: 12.7.4, Size: 12117810KiB, Build: 21H1123
* Title: macOS Big Sur, Version: 11.7.10, Size: 12125478KiB, Build: 20G1427
* Title: macOS Catalina, Version: 10.15.7, Size: 8055650KiB, Build: 19H15
* Title: macOS Catalina, Version: 10.15.7, Size: 8055522KiB, Build: 19H2
* Title: macOS Catalina, Version: 10.15.6, Size: 8055450KiB, Build: 19G2021
* Title: macOS Mojave, Version: 10.14.6, Size: 5896894KiB, Build: 18G103
* Title: macOS High Sierra, Version: 10.13.6, Size: 5099306KiB, Build: 17G66