Yes, resetting your Mac can remove most viruses, but some malware such as rootkits may persist even after a factory reset. It's always a good idea to back up your data before performing a factory reset. However, resetting your Mac should be a last resort, as it wipes all data on the disk. Before resetting, you may want to try traditional virus removal techniques such as manual or automatic cleanup. Additionally, to prevent future viruses, you can use cybersecurity software like MacKeeper.