Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Delete a directory/file via SSH
This guide explains how to delete a folder or file using SSH, which can be particularly useful when it is not possible to delete a file using an FTP client or the FTP Manager.
SSH Command to Delete a Folder/File
Infomaniak disclaims any responsibility for data loss related to these instructions.
To delete a file or directory, you need to use the rm
command.
To delete the files FileName.php
and FileName.txt
, for example, execute the following command:
rm FileName.php FileName.txt
To delete a directory, you first need to remove its contents and then use the following command:
rmdir DirectoryName/
To delete all HTML files, execute the following command:
rm *.html
- Other Useful Commands (external link)
Link to this FAQ: