How to Remove a Virus from a Hard Drive

If you’re wondering how to remove virus from external hard drive, you’ve come to the right place. Not only are viruses frustrating to deal with, but they can also be frightening, especially since they have the ability to steal and use your personal information against you.

Viruses (the malware type) are invasive and nasty things, and if your hard drive has been infected, it can be challenging to safely remove a virus from your hard drive.

However, it is possible.

This comprehensive guide will tell you everything that you need to know about viruses, prevention, and how to remove them.

What is a Virus?

A virus is a type of malware (malicious software) that attaches itself to files and programs. True to its name, viruses spread by infecting (self-replicating) their code onto other files and programs within the computer.

Viruses are commonly found in email attachments or links from unknown senders: once a user opens theis attachment or clicks the link, the virus quickly spreads onto the computer.

In addition, viruses also spread in these ways:

  • Website downloads
  • Shared drives
  • USB drives
  • Floppy disks (less common)

What a Virus Does

As mentioned previously, a virus attaches itself to a file or program on the computer. The virus will usually lie dormant until the user launches the specific program or file, which allows the virus to execute its malicious code.

As soon as the virus code is executed, the virus can infect computers on the same network. In the process, it can steal, corrupt, or even destroy data.

Computer viruses can:

  • Steal login credentials including passwords, emails, and usernames
  • Corrupt and/or overwrite files
  • Send spam emails
  • Hijack the computer
  • Impair the computer network
  • Erase data
  • Damage hard drives
  • And more…

As you can see, viruses can be dangerous, with the potential for cybercriminals to steal your personal and financial information for fraudulent purposes.

How to Tell if a Hard Drive is Infected with Virus

So, how do you know if your hard drive has been infiltrated by a virus? There are several obvious signs that could indicate that your computer’s hard drive has been infected, including:

  • Missing or moved files and folders
  • Inability or issues with shutting down or restarting your computer
  • Frequent crashes
  • Constant and unexpected pop-up windows
  • Slow performance
  • Inability to download programs or update the computer
  • New or unexplained icons or toolbars
  • Internal fans whir loudly despite minimal activity on the computer
  • Emails randomly sent from your account

If you begin to notice any of the above with your computer, you might have an infected hard drive. If this is the case, it is important that you shut down your computer instantly and do not turn it back on until you know how to destroy the virus.

How to Avoid Viruses from Infecting Hard Drive

Taking preventive measures to ensure that your hard drive does not become infected is key. Here are our top tips for preventing viruses from infiltrating your hard drive:

  • Don’t click on random links
  • Don’t open random email attachments, even from known contacts and especially from unknown senders
  • Don’t click on pop-ups or ads wjile visiting suspicious websites
  • Don’t connect unknown hard drives to your computer
  • Only go to websites with reliable domains, such as .com, .org, .edu, etc.
  • Regularly scan hard drives for virus threats
  • Install antivirus software and run regular scans

By keeping the above safety precautions in mind, you can reduce the likelihood of your hard drive and computer being infected with a virus and compromising your files and data.

Removing Viruses from Hard Drive

What if, despite taking precautions, you think your computer might be infected with a virus? How can you remove the virus from your hard drive?

We outline a few ways.

Run an AntiVirus Program

The U.S. Cybersecurity and Infrastructure Security Agency (CISA) recommends that users “Install anti-virus software from a reputable vendor” and “Update it and use it regularly.”

If you haven’t done so already, we recommend installing an anti-virus program such as iolo System Mechanic Pro® or System Mechanic® Ultimate Defense™ to find and eliminate viruses from your computer. These applications find and remove potentially harmful software, including viruses, Trojans, worms, malware, and adware. Once these malicious programs have been eliminated, System Mechanic will protect your PC against future attacks by notifying you of harmful files and permanently removing them.

Use Command Prompt

For those wondering how to remove a virus from an external hard drive using command prompt (cmd), here’s a detailed process. This solution is ideal for external hard drives that have not yet corrupted the main computer system. (Remember to disable Autorun before connecting the corrupt hard drive to the computer.)

Here are two methods for using command prompt to remove viruses. One focuses on removing viruses using file attribute changes, while the other targets malicious processes.

Method 1: Remove Viruses Using File Attributes

  1. Open Command Prompt as an Administrator
    • Search for “cmd” in the Windows Start menu.
    • Right-click on Command Prompt and select Run as administrator.
  2. Use the attrib Command
    • Type the following command to remove hidden, read-only, and system attributes that may protect malicious files: attrib -h -r -s /s /d x:\*.*
    • Replace x with the drive letter of the infected drive (e.g., G:).
  3. Run the CHKDSK Command
    • To fix drive errors, run: CHKDSK x:/f
    • Replace x with the infected drive letter and press Enter.
  4. Delete Suspicious Files
    • Navigate to the drive by typing its letter (e.g., G:) and pressing Enter.
    • Use this command to delete any suspicious files: del [Suspicious_File_Name]
  5. Disconnect and Reconnect the Hard Drive
    • Once the commands are processed, disconnect and reconnect the hard drive to ensure changes are applied.

Method 2: Remove Viruses by Terminating Malicious Processes

  1. Open Command Prompt as Administrator
    • Search for “cmd,” right-click on Command Prompt, and choose Run as administrator.
  2. List Running Processes
    • Use the following command to display all active processes: tasklist
    • Carefully examine the list for unusual or suspicious processes.
  3. Terminate Suspicious Processes
    • Once identified, use the taskkill command to stop malicious processes: taskkill /F /IM [Process_Name]
    • Replace [Process_Name] with the name of the suspicious process.
  4. Verify Process Termination
    • A confirmation message, such as SUCCESS: The process has been terminated, will indicate that the process has been successfully stopped.

It might take some time for the command to be completed, and it’ is not guaranteed to solve the problem.

If these commands don’t seem to fix the issue or the virus continues to live on the hard drive, it might be time to wipe the hard drive clean.

Wipe the Hard Drive

If other methods fail, one reliable way to eliminate a virus from a hard drive is to simply wipe the hard drive. Don’t mistake this for formatting the drive, however. While formatting is essentially the same concept, it doesn’t guarantee that the virus is gone forever.

A hard drive cleaner like iolo’s System Mechanic® will delete the virus by permanently erasing all your drive’s data. System Mechanic’s Backup and Restore and Drive Scrubber features work by making a secure copy of your digital content, then wiping all the data from your drive.

With System Mechanic, you can restore your hard drive to its original, like-new, pre-virus state. System Mechanic uses wiping methods developed for the government and military, so you can count on it to successfully clean your hard drive from stubborn viruses.

Defend Your Hard Drive Against Viruses with iolo

Whether you’re removing a virus from an infected hard drive or hoping you’ll never have to, prevention is always the best medicine. At iolo, we take your protection seriously. System Mechanic, System Mechanic Pro, and System Mechanic Ultimate Defense are designed to seek out and destroy viruses on your PC, while preventing future malicious files from infecting your hard drive. They can also help you wipe an infected external hard drive and recover the lost files.

Partner with iolo to keep your hard drive protected from future virus attacks.

For more information, visit our products page today.

Need a PC Mechanic?

Let our experts help you

LiveTech is our affordable, 24/7 premium technical support that can help you solve virtually any technology issue. Let our utility software experts help to remove malware; set up Amazon Echo/Alexa; optimize printers, modems, and routers; block browser popups and adware, and more.

Learn More

Available 24/7
People using laptop overhead view

What is iolo's Whole Home License?

The Whole Home License® is iolo’s licensing policy that allows you to install and keep your software running on all of your compatible devices within the same home. Previously, users were allowed to install and license their iolo software simultaneously on a maximum of three PCs. Under the Whole Home License, a single activation key allows you to use your iolo software on all of your PCs, other than any PCs you use for business purposes. What you need to know about Whole Home Licensing

  • You, your spouse, and your relatives living within the same household may use the same license on any number of PCs that you own which are not used for business.
  • For full legal terms and conditions, see https://www.iolo.com/company/legal/eula/

To install your iolo product on additional PCs:

  1. On the additional computer, download the latest version of your iolo product. Choose from the list of downloads offered here.
  2. Follow the steps in the installation wizard, and enter the same Activation Key that you used to install on your original computer.

You can view the Activation Key on the original computer from within System Mechanic > red menu bar > key icon > Activation Key.