68

I use Ubuntu 14.04 LTS. I tried rm 'ls', rm rf but they did not work.

muru
  • 197,895
  • 55
  • 485
  • 740
alhelal
  • 2,621
  • 1
    WARNING OF DELETION

    For just deletion of files on current directory: rm ./* and For deletion of files and folders inside in is rm -R ./* if you want no prompt mode, there is always -f parameter for that

    – Techjail Mar 01 '16 at 13:46

2 Answers2

83

Use rm * from within the specific directory. The * is a wildcard that matches all files.

It will not remove subdirectories or files inside them. If you want that too, use rm -r * instead.

But be careful! rm deletes, it does not move to trash!

To be sure you delete the right files, you can use the interactive mode and it will ask for confirmation on every file with rm -i *

Byte Commander
  • 107,489
  • 1
    If you want to remove both visible and hidden files and folders you can call: rm -r * .* – Artur Müller Romanov Jul 03 '22 at 18:19