add ability to remove imported public keys/addresses (or even privkeys) #23765

issue antonilol opened this issue on December 13, 2021
  1. antonilol commented at 8:28 PM on December 13, 2021: none

    add ability to remove imported public keys/addresses (or even privkeys) without the need of (hex) editing wallet.dat

    Is your feature request related to a problem? Please describe.

    <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

    I have an address in my wallet imported with bitcoin-cli importaddress that is read-only and shows up between my spendable UTXOs

    Describe the solution you'd like

    <!-- A clear and concise description of what you want to happen. -->

    bitcoin-cli removepubkey, bitcoin-cli removeaddress

    Describe alternatives you've considered

    <!-- A clear and concise description of any alternative solutions or features you've considered. -->

    Additional context

    <!-- Add any other context or screenshots about the feature request here. -->

  2. antonilol added the label Feature on Dec 13, 2021
  3. ghost commented at 8:43 PM on December 13, 2021: none

    I think this PR would resolve this issue: https://github.com/bitcoin/bitcoin/pull/15129

  4. antonilol commented at 9:13 PM on December 13, 2021: none

    right. i only checked the issues, should have checked PRs as well

  5. willcl-ark added the label Wallet on Oct 15, 2025
  6. willcl-ark assigned achow101 on Oct 21, 2025
  7. achow101 commented at 5:55 PM on October 27, 2025: member

    With the removal of the legacy wallet, this would be reasonable to do for watch-only wallets only. However, we should not have anything that can remove private keys from a wallet since that can lead to a loss of funds.

    Additionally, with descriptor wallets, a watch-only wallet without the imported descriptor (for the address in question) can be created by using listdescriptors, removing the descriptor from the result, and importdescriptors into a new watch-only wallet.

  8. achow101 unassigned achow101 on Oct 27, 2025
  9. maflcko commented at 8:07 AM on October 28, 2025: member

    So I guess this can be closed?

  10. antonilol closed this on Oct 28, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me