A factory reset will remove most viruses and malware from your computer. However, it's always recommended to use reliable antivirus software to thoroughly scan your system after the reset.