Will installing Linux clear any malware off a used laptop?

November 13, 2026 4 answers
Asked by nudge..northward

I have a used laptop and want to install Linux. Will the installation get rid of anything malicious left by the previous owner, or should I clean it first?

Answers

~sharpen!those+crayons

For an ordinary used laptop, a clean Linux install that replaces the whole system disk is a reasonable precaution. In the installer, look for the option to erase the disk and install Linux, rather than installing alongside the existing system.

Double-check that you have selected the right drive. Anything you need to keep on it should be backed up first, because that option removes the existing partitions and their contents from normal use. You don't need to run a separate cleaning tool beforehand.

z4!render_pass:

If the laptop has more than one drive, check those separately. Erasing the installation target doesn't automatically clean every other disk.

Reply to this answer
puddle.license!

There is a caveat: malware can theoretically persist in firmware, which a normal disk erase won't replace. That is a much less likely concern than malware on the drive, though, so I wouldn't treat it as a routine reason to avoid a used laptop.

If you have a specific reason to suspect a targeted attack, firmware inspection or reflashing may be worth considering. Comparing firmware dumps is specialized work, and differences alone don't necessarily prove there's malware.

Reply to this answer
xylophone_after_closing

No need to fill the drive with random data just for malware concerns. On an SSD, extra writes add wear, and erasing empty space isn't the same thing as replacing the existing installation. Use the installer's whole-disk option instead.

Reply to this answer
fossil_314+unclassified

If the laptop has an old hard drive, replacing it with an SSD is another option. You get a fresh drive for the installation, though it costs money and doesn't address the unlikely firmware issue.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions