on your last legs | on its last legs Informal
Meaning: If you say you're on your last legs, it can mean you're close to exhaustion, or it can mean you're close to death. If a thing is on its last legs, it's close to breaking or wearing out.
- Bobby looks like he's on his last legs. Do you think he can make it to the top of the mountain?
- My old printer is on its last legs. It's time I got a new one.