This article was updated and rechecked on 30th of January 2021

Category: Linux Terminal

Added: 15th of September 2018

Updated On: 30th of January 2021

Viewed: 3,192 times


Remove files and folders from inside directory on Linux

To remove all files and folders from inside a directory open your terminal and enter the following command

rm -rf /home/username/folder_name/*


To remove the folder after deleting all the files and folders enter the following command
rm -rf /home/username/folder_name


Remember to replace username with your own username, and as always be careful.