The Reset cache solved my problem in the iTunes advanced preferences:
Since then I can install and upgrade applications from AppStore.
Apple doesn't supply a command line helper or any scriptable cocoa classes you can latch on to for automation. Unlike the overall software update, which allows updates and installs out of the box, you can script the process of clicking buttons with a mouse using Automator.
However, the app store has been reverse engineered and released open source as well as a binary form:
The install is quick and it appears to be quite reliable on the current version of OS X 10.11:
brew install argon/mas/mas
With the source released, I would expect some other implementations of this tool to pop up, perhaps even one scripted with python.
If someone is logged into the mac (windowmanager is running), you can use Automator and the "watch me do" function to automate updates and storing your store password in the script fairly insecurely.
Here are two tutorials to get you started if this meets your needs.
http://www.tuaw.com/2009/01/19/mac-automation-creating-watch-me-do-workflows/
http://automator.us/leopard/features/virtual-user.html
Once you have a working script, you can use the command line open
command to kick it off.
If the App Store app ever exposes that function to scripting you will have more options from the command line. It would be easy to use sdef
, sdp
and gen_bridge_metadata
to dump the entire scriptable dictionary and script things using ruby from the command line, but at present the best option would be to use the mas
command line tool.
Best Answer
The log of your updates are available in:
The simple solution is to clear the update logs by deleting the mentioned file.
Here is the guide to remove duplicate if you want to keep the update logs.
Convert the
updatejournal.plist
by entering this lineplutil -convert xml1
then drag theupdatejournal.plist
from Finder into Terminal to expand the path, then press Return. Mine is the following:Open
~/Library/Application\ Support/App\ Store/updatejournal.plist
with your favorite text editor (TextEdit works fine).Find the duplicate update logs. For example, mine is Command Line Tools (OS X 10.10). The point is to delete that entry which is inside the scope of
<dict>
. So you should delete the content between<dict>
and</dict>
. Here is line I need to delete. Save the file.Convert the file back to binary1 by entering this line
plutil -convert binary1
and drag theupdatejournal.plist
from Finder, and press Return. Here is mine in Terminal:Open Mac App Store and refresh the Updates section. The duplicate line should disappear. Remember to only delete one entry of duplicate file. Imagine that
plist
as a spreadsheet with duplicate lines. Just delete one.Feel free to leave question in comment if the tutorial is vague.