Delete old data from the database