Skip to main content

Can I remove all the content in the file manager trash bin server wide?

Comments

4 comments

  • hmaddy
    just create all usernames in a txt file and create a bash script & execute to trash all accounts.
    0
  • GOT
    find /home/*/.trash -delete
    0
  • cPanelLauren
    The command @GOT provides will empty the trash for all accounts on the server, if this is what you want to do it'll work. Otherwise you'd need to loop through the users you want to delete it for. The following UAPI function would be able to remove the trash: UAPI Functions - Fileman::empty_trash - Developer Documentation - cPanel Documentation
    0
  • WebHostPro
    Perfect, thanks! I guess there is no need to use the directory like this? find /home/*/.trash/* -delete I imagine cPanel just replaces the .trash folder when deleted.
    0

Please sign in to leave a comment.