Removing apps from users desktop folder

a_holley
Contributor

Hi guys,

We have quite a few users who seem to download applications and run them from their desktop, Spotify and Chrome being the biggest culprits.

I'm looking for a way to remove the application from users desktop folders. We have a couple of users (read: myself and a few other IT people) that have these installed on their machines in their Applications folder, and we don't want to touch those.

Our users have local homes on our iMacs, and we run an AD environment.

What's the best/tidiest way that people have used to remove apps from multiple users desktop folders?

4 REPLIES 4

wakco
Contributor
rm -rf /Users/*/Desktop/*.app /Users/*/Desktop/*.dmg

You don't need the latter *.dmg, but I have found that if the app install process is to copy from a dmg file that often they run the app from the disk image, which tends to generate self update problems since the disk images mount as locked.

Make sure you test it first, as the last thing you want is the rm command going rogue due to a typo.

davidacland
Honored Contributor II
Honored Contributor II

An alternative would be to use a restrictions profile (restrictions > Restrict which apps are allowed to launch > disallow folders) to prevent apps from running in that location.

CasperSally
Valued Contributor II

We use restrictions profile to block apps from running in /users, would recommend.

a_holley
Contributor

@davidacland that's not a bad idea, it solves the issue of allowing admins to run those apps, but not standard users. The only problem is though, the reason this came up in the first place was because the apps aren't getting updated, and we are trying to patch as many holes as possible.