Take the 2-minute tour ×

Right, no kidding now ... A mate last night asked me if it is possible to erase the ghost of a section of his hard drive (set the unused section of the hard drive to '0'). So is it possible?

share|improve this question
I've no idea what any of that is. :P Please try to clarify your question. See wp:Disk Partitioning if you're unsure about the terminology –  Stefano Palazzo Jan 8 '11 at 15:51
I think Sean might mean wiping free space in an existing partition. –  Derek Jan 8 '11 at 17:54
add comment

3 Answers

I assuming your goal is to safely erase data from disk, the "wipe" utility which you can get from the repository allows you to safely clear files, partitions or entire disks. If by "unused section" you mean unused space, and you want to preserve existing partitions, then you must first create a partition on the free space, and then wipe it with:

wipe -kD partition_dev_name

For more details about wipe chekck it's man page: http://manpages.ubuntu.com/manpages/maverick/en/man1/wipe.1.html

share|improve this answer
add comment

If you want to secure erase/clear the empty space on an existing partition, try secure-delete.

To install: sudo apt-get install secure-delete

For more information see this Super User answer: How to wipe free disk space in linux.

share|improve this answer
add comment

"Ghost section" is not terminology in common use. If you mean the free space, then create a file and fill it with zeros until all free space is used, then delete it:

dd if=/dev/zero of=junk rm junk

share|improve this answer
add comment

Your Answer


