There is no one-size-fits-all answer to this question, as the effectiveness of a factory reset will vary depending on the type and severity of the malware infection. In most cases, however, a factory reset will remove any existing malware infections and restore your device to its original state.