I did this once and I never felt so dumb. Had an Asp Explorer, pretty upgraded, jump range was in the 30s.
Jumped to another system that had a Vulture for sale, I wanted to try it out since I've never had one. I didn't have the credits to buy it, so I had to trade in my Asp.
After buying it I went to check out Outfitting, but that station didn't have many options for that ship. "Fine, I'll just go to another system" I thought… Well..
Turns out the stock 7.93ly jump range of the Vulture was not enough to jump to ANY of the surrounding systems…
The station didn't have any Asps for sale, but had a Cobra Mk III in stock, so I bought me one of those and could upgrade it enough to get back home.
Since then I learned not trade in the ship that got me to the system without checking jump ranges first.