Get Rid of Files on that Won’t Delete with PuTTY

Posted on January 27, 2008

Delete Unwanted Files on Your Web Server Using SSH

Have you ever found a directory on your web server that has a ton of files that won’t delete. You have tried by FTP, logging into your control panel and nothing seems to work. I struggled with this for a few hours and learn that is was as easy as puTTY in my fingers.

If you will download the program called ” puTTY” , which is available from tucows at, please log into your server as the “unsername” user. Go to /home/unsername/public_html/DirYouWantToDelete via the ” cd” command. When you ssh in, you will probably be in the /home/unsername directory (folder). Try the following 3 commands:
cd public_html (common name for root directory files)
cd DirYouWantToDelete
pwd

The pwd command (” print working directory” ) will let you know which directory you are in.
Now try the following command:
ls

This will show all the files in this directory.

If you are in the “DirYouWantToDelete” directory, and you are completely sure you want to delete every file in that directory, you can use the following command:
rm *

———-

I have removed that directory for you. The command to do this via ssh would have been “rm -r Uploads/” The -r is recursive, as it will go into the folder and remove any files then the folder itself. All folders must be removed with the -r switch.
———-
This will remove all files — and there is no undoing of this — in the directory.

Tags: can i delete log files, putty ftp, delete shs files, permanently delete files, delete files permanenthtml, ssh putty, how to delete persistent files

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

Close
E-mail It