Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Delete a folder/file via SSH

This guide explains how to delete a folder or file via SSH, which can be particularly useful when it is impossible to delete a file with an FTP software/client or the FTP Manager.

 

SSH command to delete a folder/file

Infomaniak disclaims all responsibility in case of data loss related to these instructions.

To delete a file or directory, you need to use the rm command.

To delete the files Data.php and Data.txt, you need to execute the following command:

rm Data.php Data.txt

To delete a directory, you need to first delete its contents and then use the following command:

rmdir Folder/

To delete all files in html format, you need to execute the following command:

rm *.html

Has this FAQ been helpful?