macOS Encounters Stuck GetSoftware Command (only GetSoftware)

Issue

A macOS device stops completing device scans. In the Automox console, the device shows a scan that never finishes: Last Scanned grows stale, new scan attempts appear to queue without completing, and policies that depend on fresh scan data may not evaluate or run against the device. In some cases, Automox Support has already cleared stuck GetSoftware commands for the device, but the commands become stuck again on the next scan.

Only the software-inventory portion of the scan (the GetSoftware command) is affected — the device otherwise connects normally and responds to other commands.

Environment

  • Automox (current agent release)
  • macOS devices
  • Console areas: Devices (device details, Activity Log), device scan status

Overview

During a device scan, the Automox agent collects the device's software inventory. On macOS, part of that collection queries Apple's Software Update service (softwareupdated) for available OS and Apple software updates. If softwareupdated is hung on the device — for example, because of an incomplete or stalled macOS update — the inventory query never returns, the GetSoftware command never completes, and subsequent commands can back up behind it. Clearing the stuck command on the Automox side does not help for long, because the next scan hits the same hung service. The fix is on the device: restart the affected macOS service, then restart the Automox agent and re-run the scan.

Resolution

  1. Confirm the hang on the affected device. Open Terminal and run:

    softwareupdate --list

    If this command hangs for several minutes without returning results, the macOS Software Update service is stuck.

  2. Restart the macOS Software Update service:

    sudo launchctl kickstart -k system/com.apple.softwareupdated

    This forces softwareupdated to restart and reinitialize. Re-run softwareupdate --list to confirm it now returns promptly.

  3. Restart the Automox agent so it abandons the stuck command and starts clean:

    sudo launchctl unload /Library/LaunchDaemons/com.automox.agent.plist
    sudo launchctl load /Library/LaunchDaemons/com.automox.agent.plist
  4. In the Automox console, open the device's page under Devices and run Scan Device. Verify that the scan completes and Last Scanned updates.
  5. If the scan still does not complete, collect the agent log directory from the device (/var/log/amagent/) and contact Automox Support. 

What not to do

  • Do not repeatedly trigger new scans while one is stuck — additional commands only queue behind the stuck one.
  • Do not remove the device from the console to "reset" it; this deletes its history and does not fix the underlying service hang.
  • Do not uninstall and reinstall the agent as a first step. It is rarely necessary for this issue and is more disruptive than restarting the two services above.

Notes

  • If restarting softwareupdated resolves the issue only temporarily, look for a stalled macOS update on the device (for example, an OS update that repeatedly fails to complete). Completing or clearing that update usually stops the recurrence.
  • Verify the device has stable network connectivity to Apple's update servers; an unreachable update source can also cause softwareupdate queries to stall.
Was this article helpful?
0 out of 0 found this helpful