Bitcoin Forum
December 08, 2024, 03:36:29 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Solved: List & delete addresses from command line ?  (Read 2705 times)
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
January 02, 2015, 09:48:25 AM
Last edit: January 02, 2015, 12:52:17 PM by MoreBloodWine
 #1

When using bitcoind, what command(s) might one run to list / delete addresses ?

I have a test address I made using this: bitcoind getaccountaddress "Test"

Well, I'd like to remove the address "Test", I do have the actual address if that matters.

But ya, how does one list addresses and delete them ?

Hell, while were at it... even rename  / relabel one.

Ty.

To be decided...
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4894



View Profile
January 02, 2015, 12:25:53 PM
 #2

When using bitcoind, what command(s) might one run to list / delete addresses ?

I have a test address I made using this: bitcoind getaccountaddress "Test"

Well, I'd like to remove the address "Test", I do have the actual address if that matters.

But ya, how does one list addresses and delete them ?

Hell, while were at it... even rename  / relabel one.

Ty.

Why would you need to delete the address?  Just ignore it.  It isn't hurting anything.

Are you aware that with the default settings, the wallet has already generated 100 additional addresses that it hasn't even told you about yet.  Would you want to delete all those as well?

As for listing all addresses, you can use
Quote
listreceivedbyaddress 0 true

Although I don't think there is a way to list the 100 pre-generated addresses.  For that, you'd probably need to use a tool like pywallet.

I don't think there is a way to move an address from one account to another account ("re-label").  Since an address is only supposed to be a "single use" entity, it wouldn't really make sense to move or re-label it.  You generate it in the account that you want it attached to, then you use it ONCE to receive a tranaction.  Then you never use it again for anything.  If you need an address to receive a transaction in a different account, you just generate a new address for that account.

In my experience, "accounts" in Bitcoin Core do not work the way most people want them to work.  Most people find that they'll be much better off implementing accounts outside of Bitcoin Core in their own system and just using Bitcoin Core as a gateway.

If you think that the accounts are going to meet your needs, or you've assumed that they will meet your needs, and you haven't taken the time yet to understand exactly how Bitcoin Core manages accounts, then you are probably going to be unpleasantly surprised later.
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
January 02, 2015, 12:32:00 PM
 #3

When using bitcoind, what command(s) might one run to list / delete addresses ?

I have a test address I made using this: bitcoind getaccountaddress "Test"

Well, I'd like to remove the address "Test", I do have the actual address if that matters.

But ya, how does one list addresses and delete them ?

Hell, while were at it... even rename  / relabel one.

Ty.

Why would you need to delete the address?  Just ignore it.  It isn't hurting anything.

Are you aware that with the default settings, the wallet has already generated 100 additional addresses that it hasn't even told you about yet.  Would you want to delete all those as well?

As for listing all addresses, you can use
Quote
listreceivedbyaddress 0 true

Although I don't think there is a way to list the 100 pre-generated addresses.  For that, you'd probably need to use a tool like pywallet.

I don't think there is a way to move an address from one account to another account ("re-label").  Since an address is only supposed to be a "single use" entity, it wouldn't really make sense to move or re-label it.  You generate it in the account that you want it attached to, then you use it ONCE to receive a tranaction.  Then you never use it again for anything.  If you need an address to receive a transaction in a different account, you just generate a new address for that account.

In my experience, "accounts" in Bitcoin Core do not work the way most people want them to work.  Most people find that they'll be much better off implementing accounts outside of Bitcoin Core in their own system and just using Bitcoin Core as a gateway.

If you think that the accounts are going to meet your needs, or you've assumed that they will meet your needs, and you haven't taken the time yet to understand exactly how Bitcoin Core manages accounts, then you are probably going to be unpleasantly surprised later.
Thx for that, as for the delete thing, it's just for the "Test" address. None others, yes I know it can be ignored but it involves me changing a few things to work with a newly named address when deleting and recreating a new "Test" address is easier.

Before you call me lazy, it's something I will have to do a few times to finish testing something hence the ease of just wanting to delete an address I made.

So can it be done ?

FWIW, I don't fully understand the client like you suggested but I understand it enough for current needs minus the delete thing if it's even possible. Again, just for addresses created by me using the previously mentioned "command".

Ty.

To be decided...
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4894



View Profile
January 02, 2015, 12:42:56 PM
 #4

I'm not aware of any API calls in the Bitcoin Core wallet that will let you delete an address.

Your choices are:

  • Shut down the client, delete the entire wallet.dat, restart the client and allow it to create a new wallet that doesn't contain that address (or any of the others from that wallet)
  • Use a utility such as pywallet to edit the wallet.dat directly and remove the data that you don't want in there
  • Stop using Bitcoin Core to maintain accounts, and implement your own account system outside of Bitcoin Core
crazyearner
Legendary
*
Offline Offline

Activity: 1820
Merit: 1001



View Profile
January 02, 2015, 12:44:56 PM
 #5

Simple way to get rid of them if you know have nothing in them or any places with the address on as payment would be to back up your other addresses in it ie dump prive key in command line window and save the private keys for each address you want to keep. Back up the wallet.dat for safe keeping just to be on safe side.

Now delete the wallet.dat in the Bitcoin folder then re open and should create a new wallet.dat for you but if things go tits up you can over Wright it with your back up copy.

Next go back to command line and import your backed up private keys and import the ones you want to keep. Smiley

=
  R E B E L L I O U S 
  ▄▀▀▀▀▀▄▄                           ▄▄▀▀▀▀▀▄
▄▀        █▄▄                     ▄▄█        ▀▄
█            █████████████████████            █
█▄          ██       ██ ██       ██          ▄█
█        █            █            █        █
  █    █               █               █    █
   █ ██               █ █               ██ █
    █ █               █ █               █ █
    █ ███▄  █████▄   ██ ██   ▄█████  ▄███ █
    █     ███     █         █     ███     █
     █   █   ▀███ █  █   █  █ ███▀   █   █
     █   █      █ █  █   █  █ █      █   █
     █   █      ██  █     █  ██      █   █
      █  █     ██  █       █  ██     █  █
      █  █    ██  █ ███████ █  ██    █  █
      █ ███   ██  █         █  ██   ███ █
       █   ▀███      █   █      ███▀   █
        █     ██       █       ██     █
         █      █   ▄▄███▄▄   █      █
          ███   ███▀       ▀███   ███
             █████           █████
                  ███████████
  ▄▀▀▀▀▀▄▄                           ▄▄▀▀▀▀▀▄
▄▀        █▄▄                     ▄▄█        ▀▄
█            █████████████████████            █
█▄          ██       ██ ██       ██          ▄█
█        █            █            █        █
  █    █               █               █    █
   █ ██               █ █               ██ █
    █ █               █ █               █ █
    █ ███▄  █████▄   ██ ██   ▄█████  ▄███ █
    █     ███     █         █     ███     █
     █   █   ▀███ █  █   █  █ ███▀   █   █
     █   █      █ █  █   █  █ █      █   █
     █   █      ██  █     █  ██      █   █
      █  █     ██  █       █  ██     █  █
      █  █    ██  █ ███████ █  ██    █  █
      █ ███   ██  █         █  ██   ███ █
       █   ▀███      █   █      ███▀   █
        █     ██       █       ██     █
         █      █   ▄▄███▄▄   █      █
          ███   ███▀       ▀███   ███
             █████           █████
                  ███████████
  R E B E L L I O U S
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
January 02, 2015, 12:51:37 PM
 #6

Simple way to get rid of them if you know have nothing in them or any places with the address on as payment would be to back up your other addresses in it ie dump prive key in command line window and save the private keys for each address you want to keep. Back up the wallet.dat for safe keeping just to be on safe side.

Now delete the wallet.dat in the Bitcoin folder then re open and should create a new wallet.dat for you but if things go tits up you can over Wright it with your back up copy.

Next go back to command line and import your backed up private keys and import the ones you want to keep. Smiley
Thx, and even if a wallet is empty I still save keys just in case something shows up one day lol.

To be decided...
crazyearner
Legendary
*
Offline Offline

Activity: 1820
Merit: 1001



View Profile
January 02, 2015, 11:29:00 PM
 #7

Simple way to get rid of them if you know have nothing in them or any places with the address on as payment would be to back up your other addresses in it ie dump prive key in command line window and save the private keys for each address you want to keep. Back up the wallet.dat for safe keeping just to be on safe side.

Now delete the wallet.dat in the Bitcoin folder then re open and should create a new wallet.dat for you but if things go tits up you can over Wright it with your back up copy.

Next go back to command line and import your backed up private keys and import the ones you want to keep. Smiley
Thx, and even if a wallet is empty I still save keys just in case something shows up one day lol.

Their ya go always good to keep old wallets just in-case Santa sends you some mystery coins. Least know how to do it now and if you stuck on the commands to use just type help in command line window on bitcoin qt will give all commands in it too Smiley

=
  R E B E L L I O U S 
  ▄▀▀▀▀▀▄▄                           ▄▄▀▀▀▀▀▄
▄▀        █▄▄                     ▄▄█        ▀▄
█            █████████████████████            █
█▄          ██       ██ ██       ██          ▄█
█        █            █            █        █
  █    █               █               █    █
   █ ██               █ █               ██ █
    █ █               █ █               █ █
    █ ███▄  █████▄   ██ ██   ▄█████  ▄███ █
    █     ███     █         █     ███     █
     █   █   ▀███ █  █   █  █ ███▀   █   █
     █   █      █ █  █   █  █ █      █   █
     █   █      ██  █     █  ██      █   █
      █  █     ██  █       █  ██     █  █
      █  █    ██  █ ███████ █  ██    █  █
      █ ███   ██  █         █  ██   ███ █
       █   ▀███      █   █      ███▀   █
        █     ██       █       ██     █
         █      █   ▄▄███▄▄   █      █
          ███   ███▀       ▀███   ███
             █████           █████
                  ███████████
  ▄▀▀▀▀▀▄▄                           ▄▄▀▀▀▀▀▄
▄▀        █▄▄                     ▄▄█        ▀▄
█            █████████████████████            █
█▄          ██       ██ ██       ██          ▄█
█        █            █            █        █
  █    █               █               █    █
   █ ██               █ █               ██ █
    █ █               █ █               █ █
    █ ███▄  █████▄   ██ ██   ▄█████  ▄███ █
    █     ███     █         █     ███     █
     █   █   ▀███ █  █   █  █ ███▀   █   █
     █   █      █ █  █   █  █ █      █   █
     █   █      ██  █     █  ██      █   █
      █  █     ██  █       █  ██     █  █
      █  █    ██  █ ███████ █  ██    █  █
      █ ███   ██  █         █  ██   ███ █
       █   ▀███      █   █      ███▀   █
        █     ██       █       ██     █
         █      █   ▄▄███▄▄   █      █
          ███   ███▀       ▀███   ███
             █████           █████
                  ███████████
  R E B E L L I O U S
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
January 03, 2015, 11:49:15 AM
 #8

Simple way to get rid of them if you know have nothing in them or any places with the address on as payment would be to back up your other addresses in it ie dump prive key in command line window and save the private keys for each address you want to keep. Back up the wallet.dat for safe keeping just to be on safe side.

Now delete the wallet.dat in the Bitcoin folder then re open and should create a new wallet.dat for you but if things go tits up you can over Wright it with your back up copy.

Next go back to command line and import your backed up private keys and import the ones you want to keep. Smiley
Thx, and even if a wallet is empty I still save keys just in case something shows up one day lol.

Their ya go always good to keep old wallets just in-case Santa sends you some mystery coins. Least know how to do it now and if you stuck on the commands to use just type help in command line window on bitcoin qt will give all commands in it too Smiley
I did try help and still came here lol

To be decided...
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!