You don't "degauss" hard drives: you would have to remove them from the PC and open up the box because the metal box they are in very deliberately acts as a Faraday cage to prevent external magnetic fields corrupting the drive data...you can't degauss anything in code, it needs hardware.
And when you asked this question yesterday:
How to overwrite the hard disk many times with alternative pattern.[
^] I gave you the answer - it hasn't changed.