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

After removing Windows7 using GParted Partition Editor, I wonder if there is any files left that will affects Ubuntu 12.04. Is there any command in the terminal to clean all the remaining files from Windows7? enter image description here

share|improve this question
You removed [formatted] the entire Windows partition , so don't worry nothing is left. Seems like you are worried about viruses ?. Was your windows in 2 GB drive. – atenz Jul 21 '12 at 17:43
up vote 2 down vote accepted

There will be no files recoverable from your old Windows installation without using forensic software tools.

If you really want to bleach a drive clean, boot a LiveCD, open a terminal.

List the available disk and partitions (to work out which device your disk is)

sudo fdisk -l

And then copy zeroes over the whole surface

dd if=/dev/zero of=/dev/sda bs=8M

Replace the /dev/sda with the disk device that you wish to wipe (/dev/sda being the first available hard drive in most modern systems). Be very careful. If you have external backup drives, etc, I recommend you unplug them before doing this

Argument reference

  • dd ; a raw file copy / convert tool
  • if input file, in this case, a virtual device full of infinite zeroes
  • of output file, your disk device (in Unix, everything is a file)
  • bs block size ; we use 8M to make things go faster
share|improve this answer
If you worried about forensic tools, even this will be insufficient. You'd have to write random strings repeatedly; there are tools available to do that. – Paddy Landau Jul 21 '12 at 19:17
While scientific studies with sensitive equipment have recovered data from drives that have been zero-wiped, it's sufficient to defeat software forensics, and most commercial data recovery labs would be hard pressed to recover anything. There is some argument that the findings mentioned above are no longer true of more modern hard drives with much smaller, more fragile, magnetic domains. So all in all, unless you have the NSA chasing you, a simple zero-wipe is probably enough. – Adrian Jul 21 '12 at 19:23
Thanks. I will follow your instructions. – obetus Jul 22 '12 at 8:12

If you have completely reformatted your drive to EXT4, then I don't think there will be any old Windows file left that should bother your Ubuntu installation.

However I'm not sure about those 1.98 GB partitions. If there is nothing on them that you need, I think it should be safe to delete them and use the space as linux swap instead.

share|improve this answer
Thanks, I already tried to delete the unknown /dev/sda5, but when I open again the GParted, its still there., I have no idea what it is. – obetus Jul 22 '12 at 0:45

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.