Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Emilstud on July 04, 2018, 02:46:44 PM



Title: Can I delete my wallet.dat without problems ?
Post by: Emilstud on July 04, 2018, 02:46:44 PM
Hi, I know the risk when I delete my wallet.dat, all my privkeys are gone if they are not backuped. But on empty wallets it's no problem to delete the wallet.dat because there aren't any funds on it.

My question is, when I delete the wallet.dat, will Bitcoin Core generate a new one for me or will there be thousands of error messages ?

Greetings Emil


Title: Re: Can I delete my wallet.dat without problems ?
Post by: bob123 on July 04, 2018, 02:48:20 PM
My question is, when I delete the wallet.dat, will Bitcoin Core generate a new one for me ?

Yes. You will be able to create a new one.
You can create as much wallet files as you wish.

And if you have just created a wallet for testing purpose and didn't use any address, you can safely delete it without running any risks (even though just renaming it wouldn't hurt).


Title: Re: Can I delete my wallet.dat without problems ?
Post by: achow101 on July 04, 2018, 11:08:56 PM
My question is, when I delete the wallet.dat, will Bitcoin Core generate a new one for me or will there be thousands of error messages ?
Bitcoin Core automatically creates a new wallet file if one does not already exist.


Title: Re: Can I delete my wallet.dat without problems ?
Post by: cellard on July 05, 2018, 04:08:08 PM
I wouldn't risk it personally. It's better to always rename them, add in a number or something, for example the date of the last received transaction, to know if it's an up to date wallet or not. Satoshi always advised to never delete wallet files. It's better to have a mess of different wallet.dat files renamed than accidentally deleting a wallet file with some private keys in it. Just change the extension for example (wallet.1, wallet.2, wallet.3...) and keep it all.


Title: Re: Can I delete my wallet.dat without problems ?
Post by: hash-pool.eu on July 13, 2018, 01:41:26 PM
The wallet checks after every start if there is a wallet file and creates a new one if  necessary. It also creates many private keys and addresses (I think about hundred on the latest release).

So, if you just don't need the wallet, you can remove it.

If you already used the wallet, then make sure you have proper backups from the wallet.dat and the private keys (watch out for change addresses, they can also hold coins).


Title: Re: Can I delete my wallet.dat without problems ?
Post by: legendster on July 17, 2018, 08:19:57 AM
Hi, I know the risk when I delete my wallet.dat, all my privkeys are gone if they are not backuped. But on empty wallets it's no problem to delete the wallet.dat because there aren't any funds on it.

My question is, when I delete the wallet.dat, will Bitcoin Core generate a new one for me or will there be thousands of error messages ?

Greetings Emil

Like others have already explained. Your wallet will re-sync and reverify everything on startup if the DAT file is messed with. If you want to double check simply move the dat or rename it and see what happens. Make your own mistakes and learn. Good luck


Title: Re: Can I delete my wallet.dat without problems ?
Post by: bob123 on July 17, 2018, 09:23:30 AM
My question is, when I delete the wallet.dat, will Bitcoin Core generate a new one for me or will there be thousands of error messages ?

Like others have already explained. Your wallet will re-sync and reverify everything on startup if the DAT file is messed with.

Core won't resync/reverify anything upon deletion of the wallet.dat.
There is no reason to do so. If you remove your wallet.dat, core will generate a new one.
Syncing/Verifying is only necessary if (1) blocks are corrupted or (2) the chainstate contains errors. Not upon creating a new wallet file.



If you want to double check simply move the dat or rename it and see what happens. Make your own mistakes and learn. Good luck

This remembers me of a quote from Otto von Bismarck:
Quote
“Only a fool learns from his own mistakes. The wise man learns from the mistakes of others.”

I don't see a reason to make mistakes if dozens of people already have made them.
Visiting this forum and asking for an advice is a way better way of learning something than to make mistakes and trying to repair them afterwards.



Title: Re: Can I delete my wallet.dat without problems ?
Post by: legendster on July 17, 2018, 02:35:30 PM

This remembers me of a quote from Otto von Bismarck:
Quote
“Only a fool learns from his own mistakes. The wise man learns from the mistakes of others.”

I don't see a reason to make mistakes if dozens of people already have made them.
Visiting this forum and asking for an advice is a way better way of learning something than to make mistakes and trying to repair them afterwards.


Dear Bob,

If you think making your own mistakes and learning from them is "foolish" then you are calling all of us old-timers fools. Back when I started most of these "new" problems didn't even exist. I guess it all boils down to the differences between sheep and pioneers. Dear bob, the whole point of making your own mistake is to learn from them so you remember what your mistakes were. If learning from other's mistakes just by reading or watching them were enough then the world would be overrun with doctors and lawyers.

As far as OP's problem is considered I do believe this issue has been solved and I would request OP to lock this thread.


Title: Re: Can I delete my wallet.dat without problems ?
Post by: m88nb8y on June 05, 2021, 09:03:19 AM
Does anyone happen to know if the folder that gets created when you download Bitcoin Core Wallet, gets deleted when the wallet/program is uninstalled? Or is it archived (in which the library folder is still there with the wallet.dat file in there)?


Title: Re: Can I delete my wallet.dat without problems ?
Post by: hosseinimr93 on June 05, 2021, 10:20:58 AM
Does anyone happen to know if the folder that gets created when you download Bitcoin Core Wallet, gets deleted when the wallet/program is uninstalled? Or is it archived (in which the library folder is still there with the wallet.dat file in there)?
All your wallets files are stored in your hard drive.
Below is the location of bitcoin core wallets files on Windows, Linux and Mac respectively.


Windows:
Code:
%APPDATA%\Bitcoin

Linux:
Code:
~/.bitcoin/

Mac:
Code:
~/Library/Application Support/Bitcoin/

Visit the link below for more information.
https://en.bitcoin.it/wiki/Data_directory


Title: Re: Can I delete my wallet.dat without problems ?
Post by: Chikito on June 05, 2021, 10:59:26 AM
Does anyone happen to know if the folder that gets created when you download Bitcoin Core Wallet, gets deleted when the wallet/program is uninstalled? Or is it archived (in which the library folder is still there with the wallet.dat file in there)?
your folder won't be deleted if you uninstalled core. when you install a new core, the program will direct you to the old bitcoin folder.

I'm not sure, maybe do you want to clean leftover files? If so, after uninstalled, go to %appdata% and go to %programfiles% you will find the app bitcoin folder also. the file still also on Windows Registry > HKEY_CURRENT_USER\Software