How do I remove all of the data on a harddrive partition without removing/altering the filesystem?

I have a drive that has corrupted data on it. I need to wipe all of the data on that hard drive partition without altering the filesystem because I cannot rebuild the filesystem (It’d a very old version of XFS and cannot be upgraded, it is in an arcade machine).