I created a truecrypt partition and I don't want it anymore. How to remove/delete this partition? Does deleting the binary file is safe enough?
2 Answers
Remove the file with, eg:
sudo shred -u /dev/disk/by-id/<your_filename>
And as Terrance says in the comments:
Better to take time to eliminate, then to be sorry in the future.
from man shred
shred - overwrite a file to hide its contents, and optionally delete it
-n, --iterations=N
overwrite N times instead of the default (3)
-u, --remove[=HOW]
truncate and remove file after overwriting; See below
Delete FILE(s) if --remove (-u) is specified. The default is
not to remove the files because it is common to operate on device
files like /dev/hda, and those files usually should not be removed.
The optional HOW parameter indicates how to remove a directory entry:
'unlink' => use a standard unlink call. 'wipe' => also first
obfuscate bytes in the name. 'wipesync' => also sync each obfuscated
byte to disk. The default mode is 'wipesync', but note it can be
expensive.
-
-
-
-
1Good answer! Working in a data center, even if the drives are encrypted, it is still wise to shred or scrub the drives so there is no chance of data recovery. Better to take time to eliminate, then to be sorry in the future! =)– TerranceJul 24, 2015 at 5:28
-
1I believe should be enough to overwrite just the first MB or so of the volume, because the encrypted volume key is stored in that area. In theory, you only need to delete either your password, or the encrypted volume key, for the data to be irrevocable. That said, shredding the volume can't hurt and will also protect against any future catastrophic weakness found in the encryption, as unlikely as that would be. Jul 24, 2015 at 6:13
A.B. has already written a simple method to shred the volume. However, in case of encrypted volume, you can skip shredding and simply delete the volume as well (shredding takes time).
rm -rf /path/to/volume
shred
command. See its manpage for further info.