The 32-year-old Austrian, who joined from Sheffield United in the summer of 2012, made 88 appearances for Pompey and scored two goals.
“I want to say a huge ‘thank you’ to everyone,” Ertl told the club website. “I have enjoyed every single minute of my time at Pompey.
“It’s been challenging at times and there have been plenty of ups and downs. When I first came here, players were leaving on a regular basis and we struggled to find places to train.
“So the fact that the club is now on a sound financial footing and with a training ground to call their own is an incredible achievement.
“It’s been great to be a part of Pompey’s rebirth as the largest community club in the country and see it owned by the people who care about it the most.
“To have played for and captained this historic club is an honour and it means so much to me. This place will always remain close to my heart.”