How do I delete a file in Linux?

Last updated: March 28, 2011

To delete a file in Linux use the rm command.

Use this syntax to remove the file:

# rm filename

You will be asked to confirm by entering yes or no.

Tags: linux, bash, cli, files