Deleting history and uneeded files