Yes, you can do that, but there are much easier ways to accomplish what you’re trying to do.
Become a Patron of Ask Leo! and go ad-free!
Wiping your machine manually
The approach that you’re suggesting is simply that you start by taking a complete backup image of the machine. Hopefully, you’ve been doing that anyway, but in this particular case, a full image of the machine is the starting point.
Typically, there’s an option whether the unused space is included in a backup image or not. Usually, there’s no practical reason for it to be and the default setting is to not include those unused sectors. As long you’ve done that, then your backup image would contain only the files that were actually on the machine at the time you did the backup.
What you’re suggesting then is that you wipe the drive with something like DBan, so that all of the disk surface is completely erased.
Then, you would restore the backup image, which would restore only the files that were actually on the drive to begin with. It also might do a nice job of defragmenting the machine at the same time. But the point is that all of the previously deleted files would be gone. They would have been wiped away and then your operating system and everything you wanted to keep could be restored.
Again, that works. The net result is that the unused space on that drive has been wiped.
You just may have done a lot more work than you actually needed to.
Using apps to wipe your machine
There are applications that will simply wipe the free space.
- CCleaner is probably the easiest and quickest. If you look at some of its tools, one of them is a free space wiper and it will do exactly what you’re asking about here. This Windows app makes sure that the area that was previously occupied by deleted files is now wiped and unrecoverable.
- SDelete (Secure Delete) is a command line tool and it has an option to do a free space wipe.
Either one of those will solve this problem for you with fewer steps. Add defragmentation at some point (probably after you’re done) and you’ve got basically the same thing that you would have by using your backup-wipe-restore approach.