When I got rid of my last car which was on its last legs and wasn't likely to be resold, I donated it to charity. I know I didn't get as much for it, but it went to a good cause and they came and picked it up from my house, so I didn't have to take it anywhere, didn't have to haggle with Carmax, etc.
I took a former car that was also on its last legs to Carmax and because of the condition, there were not going to be able to resell it, so it would go to auction, likely for parts. At that point, the offer was low. I found that charities will give you a much better KBB value for the write up that will be higher what the resellers will give you. With the higher value, even at our tax rate, I got about half off my taxes what the car would have gotten me from Carmax and I felt better about giving the the charity and it was nice that they came and towed the car away.
So, after that earlier car, I drive my cars into the ground and then donate them to charity. They resell the cars to auction, much like Carmax and other places, but at least the value goes into a charity instead of into the profits of a a large business.