How to Delete a Non-Empty Folder from the Command Line on Raspberry PiBy Jacques Fargion / 5 November 2020 To delete a folder that contains files, simply run this command (changing the path and folder name, of course): sudo rm -rf /path/directory Note: these commands work on every Linux distribution. Enjoy! Share this: Share on Facebook (Opens in new window) Facebook Share on LinkedIn (Opens in new window) LinkedIn Share on X (Opens in new window) X Share on Pinterest (Opens in new window) Pinterest Share on Telegram (Opens in new window) Telegram Share on WhatsApp (Opens in new window) WhatsApp Like this:Like Loading…