You could exchange your items for gold
you get gold in exchange for having items
There already is a command in place for that. /sellallitems sells EVERYTHING SELLABLE in your inventory at 1/5th the shop price. It doesn't sell Plat or special Items not sold in the shop. Drop anything you don't want sold into a box or on the ground as long as it is out of your player inventory.