The city of Portsmouth has parted ways with three of its department heads.