How to remove a transaction from the memory pool Using Bitcoind and Json-RPC, how to remove an unconfirmed transaction from the memory pool?

The scenario being removing the unconfirmed transaction because it's not getting confirmed, and it's preventing me from sending new transactions spending the same inputs because Bitcoind considers it a double spend.
Try the removeprunedfunds RPC command. It


  deletes the specified transaction from the wallet. … This will effect wallet balances.