remove unrelaed jobs, clean up contexts and metadata