Utilizing Softwareupdate Command

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
08-02-2018
09:17 AM
- last edited on
03-04-2025
08:31 AM
by
kh-richa_mig
Hello Everyone,
I have been using the built in macOS update function to get devices from 10.13.5 to 10.13.6 via Terminal. I figured I could create a policy that uses executes the command
sudo softwareupdate -iaR
in order to pull down the OS upgrade and also whatever is sitting in the App Store in a pending state. For some reason I am having no luck. For reference, this works fine via Terminal as well as pushing out a UNIX command in ARD.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-02-2018 09:23 AM
What do you mean by having no luck? What's happening?
Also you do not need sudo
in your command. Jamf runs policies with root privileges already.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-02-2018 06:23 PM
I found using :
#!/bin/sh
softwareupdate -ia -R
works better

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-03-2018 03:53 AM
I have seen that if I don't specifically download the updates first before running the -ia switch, it might sometimes fail. What I've done is create a policy that runs in the background to only run softwareupdate -d -a
at check in. This makes sure that the applicable updates are already waiting to be installed and it means the user doesn't have to wait for the downloads. Then I put a policy in Self Service that runs
softwareupdate -i -a
That makes the process visible to the user go faster. I will have to remember the -R switch once we go to 10.13.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-03-2018 06:06 AM
@Ricky @BOBW @AVmcclint Since we're on the topic, figured I'd plug this feature request: https://www.jamf.com/jamf-nation/feature-requests/7285/add-softwareupdate-restart-support which deals with this new flag in 10.13.4+.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 08-05-2018 08:19 PM
upvoted the feature request :)
