You're not doing anything wrong, wpurge however seems to be somewhat broken, I encountered a similar issue earlier this week where mpurge worked just fine but wpurge failed to be able to purge items from a mobs inventory.
On an unrelated note though:
Code:
while %actor.inventory%
eval item %actor.inventory%
eval item_to_purge %%actor.inventory(%item.vnum%)%%
eval stolen %item.vnum%
would be better written as:
Code:
while %actor.inventory%
set item %actor.inventory%
set item_to_purge %actor.inventory(%item.vnum%)%
set stolen %item.vnum%
None of those lines require using eval, set will work just fine and use less cpu time. The %% are also un-needed. They are only required when double parsing.
Variables inside of variables only require double parsing when they aren't inside a subfield.
ie.
%%actor.inventory%random.3%%% < Tis requires double parsing
%actor.inventory(%random.3%)% < This does not
eval i %i%+1
that line there is in fact the only line that should use eval in the whole script.