jiǎo​tù​sǐ​zǒu​gǒu​pēng

to discard someone after they have served their purpose

狡兔死走狗烹 jiǎo​tù​sǐ​zǒu​gǒu​pēng
to discard someone after they have served their purpose
Literally "to boil the hound once it has caught the rabbit"; used as an idiom to describe getting rid of those who have accomplished a task once they are no longer needed.