Remove an Apple ID from App Store?

LVISDJShip
New Contributor

Hello all,
I mistakenly imaged my deployment of iMacs with my Apple ID still intact; I really need a way to take that out of 102 machines. Any ideas?
Specifically the Mac App store has updates for iLife that at image creation time I updated with my work Apple ID thinking that imaging would remove data such as that.

Thanks,

11 REPLIES 11

Gorman
New Contributor

In ~/Library/Preferences delete com.apple.storeagent.plist and reboot. This should clear the previous user.

LVISDJShip
New Contributor

To push this to all computers would I use JSS, create a new policy -> advanced -> run command? Would I type it as:
rm ~/Library/Preferences/com.apple.storeagent.plist

Thanks! I'm new to the apple environment in general, still grocking with everything (lovin' it)

~james

mm2270
Legendary Contributor III

No, you can't use the ~ in your command or it will just try to delete that file from the root account. you need to get the current logged in user and target their home folder path

You could still do it from the Run Command though with something like this-

rm /Users/$(who | awk '/console/{print $1}')/Library/Preferences/com.apple.storeagent.plist

But the one problem with the above is, it will only work on the logged in account. If only one person ever really uses each Mac, it will be fine. If you're looking to remove that file from multiple home folders on each Mac, you'd need a more full fledged script to loop through all local accounts and remove it from each one it finds.

Sandy
Valued Contributor II

HI,
I would package that plist (as a .dmg), and then use uninstall, with FEU and FUT enabled.
To uninstall of course you need to index the dmg after uploading it, and also check the box in Casper admin to allow it be be uninstalled.
Sandy

Nix4Life
Valued Contributor

credit to jagress for do-loop frame. the script would look something like this, if you didn't do Sandy's suggestion.package it then run it trough Casper. good script to have in case you want to remove users, you would just have to modify

#!/bin/sh

for home in $(ls /Users | grep -v "yourlocaladminaccount" | grep -v Shared)
do
rm -rf /Users/$home/Library/Preferences/com.apple.storeagent.plist

done

LVISDJShip
New Contributor

Ah, great! Thanks everyone.

LVISDJShip
New Contributor

For a test I've removed the plist from a user manually and rebooted and I still have the Apple ID populated with when trying to upgrade iPhoto and iMovie. I saw a lockfile for this plist as well so I deleted that one too. On the reboot they were both recreated.
Any thoughts? Thanks,

james

mm2270
Legendary Contributor III

Yeah, of course. That's because the apps themselves have your Apple ID embedded in them, so when you attempt to update them, it knows you purchased them and prompts for your credentials to do the upgrade. It should not have your password stored though. I don't think anything related to the MAS does that anyway for security reasons.

I think there was a misunderstanding of what you were trying to do. The assumption may have been that you had logged in with your account and just forgot to log out. The above trick in removing the plist file will essentially log out of the App Store, but it will not do anything to remove your ID from the apps you downloaded from the store.

For that, you're going to need to remove the apps themselves most likely and find another way to obtain and distribute them. The lesson here is the Mac App Store is NOT enterprise ready in the least. In fact, its downright hostile to the enterprise if you ask me.

There is a _MASReceipt folder with a "receipt" file inside the app bundles, but when I attempted once to remove those it completely broke the apps. No easy way to fix your situation I'm afraid. Welcome to the wonderful world of Apple IDs. <Gives Apple the evil eye>

For a little more info on the topic. see this JAMF KB article-
https://jamfnation.jamfsoftware.com/article.html?id=206

It provides another way to approach this, but you will need to package up any updates to said apps and deploy them. No way for your users to do so without having your Apple ID.

LVISDJShip
New Contributor

Sorry for the confusion; but thank you for explaining this to me :)
I'll start the process to remove these two apps and then package them distribution (actually the full iLife suite will have to go).
My lesson is learned!

mm2270
Legendary Contributor III

We're considering removing the full iLife Suite from our Macs as well due to similar reasons. At one time the apps that shipped with the Mac weren't associated to anything. They were basically "CD" style installed apps and so there was no problem to keep them on the image and even update them all before creating your OS image. Apple has now moved these to being associated with the MAS so any attempt to update them on an image suddenly makes the person who updated them the owner of those apps forever. *sigh*

For us, we're debating whether to keep them. Its a shame to have to remove "free" apps from our image, but they are so underused its not worth the extra hassle of managing them now the way Apple ships them.

rhysforrester
New Contributor

Removing the apps saves ~4.7gb of space FYI.