There’s a whole universe of folks selling used books on Amazon FBA. I suggest start with a google search of exactly that.
There’s apps which allow you to scan UPC codes and look up a price on Amazon. I’d personally sort the books by market value. Sell the books that are profitable, trash the ones which are not, save the ones which are very rare or have no UPC code, and use the money to grow the storage space.