Would require some work to be done VERY carefully and as a result this feature will give user lots of warnings all the way :grin:
Might also require manual rescan/zapwallettxes at the end of it.
That has also a workaround/proper use case: user shouldn't use "receiving addresses" as a base functionality but use "requesting paymens" instead which (payments) can be deleted.
With that being said:
1) "normal" user wouldn't require this too ofthen imo;
2) power user is able to run scripts to dump privkeys he need, create new wallet, import privkeys (and send the leftover if there any).
To sum: it's not trivial (guessing here) and scary (for sure) to mess with the wallet.dat AND it has another/proper functionality to achive more or less the same result so I would place this at the end of todo list (if mess with this at all).
Thnx Udjin, very good answer.
I created the new wallet, imported all addresses I wanted and lets say that from almost 3,5 MB wallet with many addresses inside got nice 700 KB one
Anyway it`s good to know that is is even possible....
Cheers....