XCode: “You have updates available for other accounts”

If you are unlucky enough to have installed XCode from the Developer Network, instead of the new Mac App Store, you may be seeing this message:

You have updates available for other accounts.

This may be followed by either an actual account email address, or by a generic message saying to “sign into the account you used to purchase it.”

Either way, it’s a problem. You can’t install or update XCode until you delete the “Install XCode.dmg” file which is usually found in your /Applications directory, but which was in my Downloads folder, because I copied the DMG file from someone else with a local connection, rather than download it from the Developer site again.

Bit of a stupid problem, but luckily it has a simple answer.