After trading, you want to empty the trade depot completely, back to whatever stockpiles you have, and don’t see how to do that? Read below.
Tips to Moving Stuff from Trade Depot Back to Storage
If you have room in your stockpiles, the dwarves should take care of this automatically.
You may have to watch out for the odd thing you don’t yet have a pile for, but otherwise they will take care of putting your purchases away.
If you brought more trade goods to the depot than you ended up needing, those will get returned after the merchants leave, or you can go into the “bring goods to depot” screen and uncheck them, which will make the dwarves take them back immediately.
Be careful making All stockpiles, you’ll usually want to make them custom and remove corpses and refuse (except shells) from being stored there.