But I have no idea where / how to use this, I've been going through docs all day, without any luck.
Can someone tell me / point me to a step by step guide on how to do this? Basically, I'm looking to add the above to the admin console page at admin/admin-scheduledjobs, where you can hit 'run' to run the job immediately.
Any help is greatly appreciated, the server I am working on has run out of space (due to lots deleted files), and I need to free it up ASAP.
or simply set following properties in alfresco-global.properties file and restart:
system.content.orphanProtectDays=14 #default value, change it as per your need
Also note that, deleting the orphand nodes won't reclaim the space unless you also cleanup "contentstore.deleted" folder. ContentStoreCleaner will move orphand nodes from /contentstore/ to /contentstore.deleted/ folder.
If you want, orphand files to be deleted completely without being moved to contentstore.deleted folder, add the following in alfresco-global.properties:
Note that, it is not recommended as long as you have appropriate backup/restore strategy in place.