A new feature in macOS Sierra is the ability to put items in the Trash and have those items automatically be deleted after 30 days. This option can be set in the Finder preferences using the process shown below:
1. Open the Finder preferences
2. Select the Advanced options
3. Check the Remove items from the Trash after 30 days checkbox.
It’s also possible to enable or disable this setting from the command line. To enable the Remove items from the Trash after 30 days setting, the following defaults command can run by the logged-in user:
defaults write com.apple.finder FXRemoveOldTrashItems -bool true
To disable it, the following defaults command can be run by the logged-in user:
defaults write com.apple.finder FXRemoveOldTrashItems -bool false
For those who want to enable the Remove items from the Trash after 30 days setting using management profiles, I’ve created a .mobileconfig file and posted it here on Github:
https://github.com/rtrouton/profiles/tree/master/RemoveTrashAfter30Days