Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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:

share|improve this answer

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

"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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.