0

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
  • It's a file and not a partition, I guess? You could use the shred command. See its manpage for further info.
    – Byte Commander
    Jul 23, 2015 at 18:20
  • What's wrong with my answer now? The question was "safely", not "fast".
    – A.B.
    Aug 14, 2015 at 18:21

2 Answers 2

1

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.
7
  • The partition is already encrypted. Why waste time shredding it?
    – xyz
    Jul 23, 2015 at 19:09
  • @prakharsingh95 I'm paranoid =)
    – A.B.
    Jul 23, 2015 at 19:10
  • My encrypted volumes range ~50GB. It's takes painfully long to shred.
    – xyz
    Jul 23, 2015 at 19:11
  • 1
    Good 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! =)
    – Terrance
    Jul 24, 2015 at 5:28
  • 1
    I 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
0

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
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .