Vote with one’s feet

To express one’s dissatisfaction with something by leaving or walking away.

The students were voting with their feet when they began to leave the science course.