How do I remove infected files found with ClamAV?

Linode Staff

I ran ClamAV on my Linode, and it found some infected files. How do I remove them now?

1 Reply

To remove infected files found by ClamAV, you can run the clamscan command with the --remove flag, as outlined in this post from Ask Ubuntu. As mentioned in that post, the command you want to use is:

clamscan -r --remove /home/USER

You can also opt to move the files to another location if you wish to audit them before deletion with the following command:

clamscan -r --move=/home/USER/VIRUS /home/USER


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct