LoginSignup
6
13

More than 3 years have passed since last update.

macOSのソフトウェアアップデートはコマンドラインで

Last updated at Posted at 2018-04-23
  • App Storeアイコンのバッジでアップデートに気づいて動かすとなんかアップデートに時間がかかって微妙...ってことありませんか?
  • ソフトウェアアップデートにはコマンドもあるんですね、アップデートはコマンドラインからしちゃいましょう!
  • なんとなく精神衛生的にいい感じですw

softwareupdate

  • ヘルプを見るとこんな感じ
sh-3.2$ softwareupdate -h
usage: softwareupdate <cmd> [<args> ...]

** Catalog Management:
    --set-catalog <URL> Set the new catalog URL (requires privileges)
    --clear-catalog     Clear the catalog URL back to defaults (requires privileges)

** Manage Updates:
    -l | --list     List all appropriate update labels (options:  --no-scan, --product-types)
    -d | --download     Download Only
    -e | --cancel-download      Cancel a download
    -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
    --background        Trigger a background scan and update operation
    --ignore <label> ...    Ignore specific updates
    --reset-ignored     Clear all ignored updates

** Other Tools:
    --suspend-background    Suspend background operations from occurring temporarily (use --duration to specify duration to suspend in seconds)
        --duration <duration>)      Optional duration in seconds to suspend background operations (defaults to 5*60 seconds)
    --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

    --verbose       Enable verbose output
    --help          Print this help

基本的には、softwareupdate -i -aでOK

  • 全てインストール(リスタートは無し)で実行します。
sh-3.2$ softwareupdate -i -a
Software Update Tool

Finding available software
6
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
13