This cheat will clear all items from the inventory of your target. This command can be used on NPCs and containers. Use 'player.removeallitems' to clear your own inventory. Use 'removeallitems player' to move items from your target's inventory into your character's.
removeallitems [reference id] Target Command
|Reference ID||Optional. If you specify a reference ID of an NPC or character here, the objects will be cleared from your target's inventory and added to this inventory. If this is not specified, your target's inventory contents will be permanently deleted.|
This is the default way to execute this command - this would clear the inventory of your target (removing all items). To select a target, click on an NPC or container (like a chest) whilst the console is open.
The above console command would move all of the items in the inventory of your target into the inventory of the NPC or container with reference ID '0078783'.
This example is similar to the second, but instead of moving them into the inventory of an NPC with a specified reference ID, this command will move the items from your target's inventory into your own inventory.
This console command clears your character's inventory.