give up the ghost
give up the ghost {v. phr.}
To die; stop going.
After a long illness, the old woman gave up the ghost.
The motor turned over a few times and gave up the ghost.
Categories:
Source: A Dictionary of American Idioms