<p>No, and in fact, deleting a file is not destructive enough.</p>
<p>File deletion typically does not actually delete the file. Filesystems will just mark a file as deleted and allow it to be overwritten. If the file does not end up overwritten, it can be recovered from the drive using some forensic tools.</p>
<p>Furthermore, the way that the hard drive itself writes data physically often leads to data being left behind and just marked to be overwritten. So there could actually be multiple copies and fragments of your wallet.dat file left on the hard drive. Forensic analysis tools can then recover those fragments even after the file has been deleted, and some portions overwritten.</p>
<p>A better guarantee that no one can recover the data is to wipe the hard drive and overwrite every part of it with random data. However there is the potential for bad sectors or other issues with the drive which prevents an overwrite from actually overwriting some portions of the drive.</p>
<p>To be absolutely sure that data cannot be recovered, you have to do what companies like Google do to ensure that data cannot be recovered from their used drives: completely destroy the physical drive. Physical destruction is actually the only way to ensure that no data can be recovered from a drive.</p>

CC BY-SA 4.0
2020-09-04T07:37:33.590Z
If you plan ahead, and your drive supports in-hardware cryptographic disk erase (i.e. "throw away the encryption key"), then you don't actually need to destroy it unless that malfunctions. But this does require you to be extremely confident that the firmware is doing what it tells you it is doing, which may be viable for Google, but not you.
Kevin
CC BY-SA 4.0
2020-09-03T18:21:30.457Z
2020-09-03T18:21:30.457Z
Ava Chow
<p>I'd like to completely delete an address from bitcoin-core, in such a way that someone who obtains all the data on my computer could not find out I ever used that address.</p>
<p>Is it enough to delete <code>wallet.dat</code>? Is there a less destructive way?</p>

CC BY-SA 4.0
2020-09-03T18:14:56.927Z
You might need to use [special file deletion software](https://en.wikipedia.org/wiki/Gutmann_method) or your wallet.dat may be recovered.
MCCCS
CC BY-SA 4.0
2020-09-03T18:18:25.207Z
The address may also be in debug.log and other log files, as well as earlier versions of those files that may have been deleted but their data is still on the disk.  If you need to be certain, there are not a lot of options short of wiping or destroying the entire disk.
Nate Eldredge
CC BY-SA 4.0
2020-09-04T02:56:21.507Z
It is definitely worth doign a risk assessment here.  If that bitcoin address is going to reveal that you are a traitor to your nation and get you imprisoned or worse and some three letter agencies are breathing down your neck, then you're going to want a higher degree of certainty than if you just want to make sure your family doesn't link you to an activity they don't approve of.
Cort Ammon
<bitcoin-core><address><privacy>
Securely erase a previously used address from bitcoin-core
jfhr
# Securely erase a previously used address from bitcoin-core

(Asked by: username_0 on 2020-09-03)

I'd like to completely delete an address from bitcoin-core, in such a way that someone who obtains all the data on my computer could not find out I ever used that address.

Is it enough to delete `wallet.dat`? Is there a less destructive way?

**Tags:** bitcoin-core, address, privacy

> **Comments:**
> **username_1**: You might need to use [special file deletion software](https://en.wikipedia.org/wiki/Gutmann_method) or your wallet.dat may be recovered.  
> **username_2**: The address may also be in debug.log and other log files, as well as earlier versions of those files that may have been deleted but their data is still on the disk.  If you need to be certain, there are not a lot of options short of wiping or destroying the entire disk.  
> **username_3**: It is definitely worth doign a risk assessment here.  If that bitcoin address is going to reveal that you are a traitor to your nation and get you imprisoned or worse and some three letter agencies are breathing down your neck, then you're going to want a higher degree of certainty than if you just want to make sure your family doesn't link you to an activity they don't approve of.  

---

## 1 answers

### Answer by username_4 on 2020-09-03. Score: 5 | Accepted answer

No, and in fact, deleting a file is not destructive enough.

File deletion typically does not actually delete the file. Filesystems will just mark a file as deleted and allow it to be overwritten. If the file does not end up overwritten, it can be recovered from the drive using some forensic tools.

Furthermore, the way that the hard drive itself writes data physically often leads to data being left behind and just marked to be overwritten. So there could actually be multiple copies and fragments of your wallet.dat file left on the hard drive. Forensic analysis tools can then recover those fragments even after the file has been deleted, and some portions overwritten.

A better guarantee that no one can recover the data is to wipe the hard drive and overwrite every part of it with random data. However there is the potential for bad sectors or other issues with the drive which prevents an overwrite from actually overwriting some portions of the drive.

To be absolutely sure that data cannot be recovered, you have to do what companies like Google do to ensure that data cannot be recovered from their used drives: completely destroy the physical drive. Physical destruction is actually the only way to ensure that no data can be recovered from a drive.

> **Comments:**
> **username_5**: If you plan ahead, and your drive supports in-hardware cryptographic disk erase (i.e. "throw away the encryption key"), then you don't actually need to destroy it unless that malfunctions. But this does require you to be extremely confident that the firmware is doing what it tells you it is doing, which may be viable for Google, but not you.  

---

