Is it possible to obtain an information about availability latest Mac OS X updates via any API? I'd like to know if all available updates were installed on a user's Mac before running some functional. For example: user mac has 10.8.1 installed and I need to check is it latest version of the OS or not. Also I need to check that all security updates were installed too.
You can use softwareupdate
command.
Software Update checks for new and updated versions of your software based on information about your computer and current software.