Delete Mac Files From Laptop

StAnneTech
New Contributor

Hi all,

I'm trying to delete files created by students on shared MacBooks and MacBook Airs using JAMF. I don't want to unmanage them or delete the users, just get rid of the files (pictures, docs, downloads, etc.) from the previous school year so they're clear from work done by students the previous year.

Thanks!

1 REPLY 1

sdagley
Esteemed Contributor II

@StAnneTech Do the students log in to those Macs with their own credentials (i.e. are these Macs bound to a directory service like Active Directory), or do they all log in to the same account on a machine? If the former, you will find examples on how to delete directory accounts by searching Jamf Nation. Here's one example: Script to delete users and home folders but not admin accounts

If your students all use the same account on your Macs you could easily write a script that deletes the contents of that account's Desktop, Documents, Downloads, Movies, Music, and Pictures directories and deploy it with a Run Once policy.