ISTANBUL — When Aynur Barkin became one of roughly 40,000 teachers purged from Turkey’s education system after last year’s attempted coup against President Recep Tayyip Erdogan, she was not immediately replaced. As a result, her second-grade students were forced to join the third grade, tripling their original class size.

“I could pay attention to each of them one by one,” said Ms. Barkin, 37, who was fired in February from a school west of Istanbul. “But their new teacher can’t do that.”

That is one example of the administrative upheaval and chaos caused by the government’s vast purge of Turkish institutions since the failed coup in July — the backdrop for a referendum on Sunday to expand the president’s powers.

Mr. Erdogan’s government has sought to root out any remaining dissent by targeting nearly every segment of society. It has also used the purge as cover for a crackdown on dissidents of all stripes, including leftists like Ms. Barkin.