Recursively Delete Directory Using SSH

This article will demonstrate the procedure to recursively delete directory using SSH. Upon completion, the directory and all contents will be deleted.

Recursively Delete Directory Using SSH

To recursively delete directory using SSH, follow the steps outlined below:

  1. Login to the server using SSH.
  2. Run the following command:
    rm -rf directoryname

    Replace "directoryname" with the name of the directory to be deleted.

The directory is now deleted.

Conclusion

You now know how to recursively delete directory using SSH.

  • ssh commands, command line
  • 149 Users Found This Useful
Was this answer helpful?

Related Articles

Forcefully Delete an IP Address from SolusVM

If at any point you find you have an orphaned ipaddress, you can delete it by running the...

Do You Offer a Hardware Firewall Solution?

Yes, we have a very limited selection of hardware firewalls available. We appreciate the specific...

How to Create Sudo User on CentOS

This article provides step-by-step setup guide for adding Sudo user to CentOS system. The sudo...

How to Use Sudo

This article provides a guide to using a Sudo user on CentOS server. From the command line,...

Set Server Time Zones with Timedatectl

This article provides a guide to setting the server time and server time zone settings using...