I have always overloaded my backpack by swapping active weapons with loot on the ground to keep adding new things to my backpack when I am over quota. It means I can only get more space by getting a mission reward that I can then use to swap something else in.
Well... This week I realized that in the vending machine if you sell enough gear to get under your backpack size you can buy something, and then use the buy back option to buy back all the gear you sold over your backpack quota. I have sold as many as 15 or so items, bought a few, and then bought my old gear back.
I tried later with a level 72 Zer0 I started a few months back that had 115 items in his backpack. I sold it down to max backpack space, and when I tried to buy all the gear back I had passed the vending machine's cap! I quit out without saving so I didn't lose all my gear.
All that said, this is really useful early game when you are trying to get gear for all occasions and drops are scattershot and farming can be a bother since you're just trying to run through normal and true vault hunter mode. Just make sure you have plenty of money because items of the day are pricey and you could end up with not enough money to buy your old gear back. Zoning out of an area basically erases it so you can't go far to farm up money.
If you play it smart (selling back the cheapest & less essential gear to make space just in case) it helps you get around the scarce eridium in the early play through that keeps you from getting those SDUs for your backpack and Bank.