Quote from 500 Internal Server Error
The hacky method is
i.e. add a negative amount. This was reported to work.
(replace 256 with the ID of the item you want removed)
It did work, but the item still looks like it is in the inventory until the world is reloaded.