Fix a “could not complete your purchase” App Store error
I've been having an odd issue with the Mac App Store app on my Mojave-running iMac: Sometimes the App Store app will fail to install an update for some app. When that happens, I see a dialog with this text as the title:
We could not complete your purchase.
Below that is a single word, "cancelled," and that's all. Searching the web, I came across this thread on stackexchange.
What finally worked for me was a combination of things listed there—none of these steps on their own seem to fix the problem, but all together do, at least until it occurs again.
- Quit the App Store app.
- Switch my DNS to another provider.
- In Terminal, paste this command and press Return:
open "$TMPDIR/../C/com.apple.appstore/" - Confirm that the Finder opened a window to the com.apple.appstore folder, then drag everything there to the trash.
- Back in Terminal, paste this line and press Return: killall -9 appstoreagent
- Relaunch the App Store app.
This method has worked for me each time I've had this issue. It's annoying that it keeps recurring, but at least the fix is relatively simple.