When a node is updated by replacing a new file upload, old files exist on the server maintaining versions.I want delete old files from server when content is updated in Drupal7
This is already discussed topic. I found some source.
After that I would create a cron job (Implementing hook_cron). And insert this snippet.
I hope it works out for you.
Alternatively, if you dont want this action to happen once per day, you can insert it in hook_submit, or hook_update. But I would go for the first method.
Do it once per day/week/whatever time period you like.