It was only the land of the priests that Joseph did not buy, because the priests were given an allowance. They ate from the allotment which Pharaoh gave them. Therefore they did not sell their land.