on one’s last legs

on one’s last legs

and on its last legs
mod. about to expire or become nonfunctional. This car is on its last legs. We have to get a new one.
See also: last, leg, on