Added function to delete outdated modules in update_all process