LKBEN11444: How to completely delete a disk with linux.


Symptom

You need to erase a hard disk and it should be impossible to recover any data from it.

Cause

You want to dispose an old computer system and want to be shure nobody can access your data.

Solution

In Linux you can use the shred command to overwrite all data 3 times (or more if you want to)

sudo shred -v /dev/sdX

Please do not use sdcX because that is a partition and you want to erase everything, not just one partition.

The following command will set all bits to 0 after the last iteration.

sudo shred -v -n1 -z /dev/sdX

There also exists a gui tool called bleachbit.

Deleting all information from a HD will take a long time. If you do not want to sell your computer it might be easier and much quicker to physical destroy the hard disk with a hammer.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!

About the Author

Author: Wim Peeters - Keskon GmbH & Co. KG

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.

Latest update: 29/09/2020 | Comment: