give up the ghost
to stop trying to do something, because you no longer believe that you can succeed
In Manhattan there was no Memorial Day parade this year. The organizers said they've given up the ghost after so few people turned out last year.
if a machine gives up the ghost, it stops working
A short way off the return ferry, Danny's car gave up the ghost again.
Easy Learning Idioms Dictionary. Copyright © HarperCollins Publishers