github.com/artpar/rclone@v1.67.3/docs/content/commands/rclone_delete.md (about) 1 --- 2 title: "rclone delete" 3 description: "Remove the files in path." 4 slug: rclone_delete 5 url: /commands/rclone_delete/ 6 groups: Important,Filter,Listing 7 versionIntroduced: v1.27 8 # autogenerated - DO NOT EDIT, instead edit the source code in cmd/delete/ and as part of making a release run "make commanddocs" 9 --- 10 # rclone delete 11 12 Remove the files in path. 13 14 ## Synopsis 15 16 17 Remove the files in path. Unlike [purge](/commands/rclone_purge/) it 18 obeys include/exclude filters so can be used to selectively delete files. 19 20 `rclone delete` only deletes files but leaves the directory structure 21 alone. If you want to delete a directory and all of its contents use 22 the [purge](/commands/rclone_purge/) command. 23 24 If you supply the `--rmdirs` flag, it will remove all empty directories along with it. 25 You can also use the separate command [rmdir](/commands/rclone_rmdir/) or 26 [rmdirs](/commands/rclone_rmdirs/) to delete empty directories only. 27 28 For example, to delete all files bigger than 100 MiB, you may first want to 29 check what would be deleted (use either): 30 31 rclone --min-size 100M lsl remote:path 32 rclone --dry-run --min-size 100M delete remote:path 33 34 Then proceed with the actual delete: 35 36 rclone --min-size 100M delete remote:path 37 38 That reads "delete everything with a minimum size of 100 MiB", hence 39 delete all files bigger than 100 MiB. 40 41 **Important**: Since this can cause data loss, test first with the 42 `--dry-run` or the `--interactive`/`-i` flag. 43 44 45 ``` 46 rclone delete remote:path [flags] 47 ``` 48 49 ## Options 50 51 ``` 52 -h, --help help for delete 53 --rmdirs rmdirs removes empty directories but leaves root intact 54 ``` 55 56 57 ## Important Options 58 59 Important flags useful for most commands. 60 61 ``` 62 -n, --dry-run Do a trial run with no permanent changes 63 -i, --interactive Enable interactive mode 64 -v, --verbose count Print lots more stuff (repeat for more) 65 ``` 66 67 ## Filter Options 68 69 Flags for filtering directory listings. 70 71 ``` 72 --delete-excluded Delete files on dest excluded from sync 73 --exclude stringArray Exclude files matching pattern 74 --exclude-from stringArray Read file exclude patterns from file (use - to read from stdin) 75 --exclude-if-present stringArray Exclude directories if filename is present 76 --files-from stringArray Read list of source-file names from file (use - to read from stdin) 77 --files-from-raw stringArray Read list of source-file names from file without any processing of lines (use - to read from stdin) 78 -f, --filter stringArray Add a file filtering rule 79 --filter-from stringArray Read file filtering patterns from a file (use - to read from stdin) 80 --ignore-case Ignore case in filters (case insensitive) 81 --include stringArray Include files matching pattern 82 --include-from stringArray Read file include patterns from file (use - to read from stdin) 83 --max-age Duration Only transfer files younger than this in s or suffix ms|s|m|h|d|w|M|y (default off) 84 --max-depth int If set limits the recursion depth to this (default -1) 85 --max-size SizeSuffix Only transfer files smaller than this in KiB or suffix B|K|M|G|T|P (default off) 86 --metadata-exclude stringArray Exclude metadatas matching pattern 87 --metadata-exclude-from stringArray Read metadata exclude patterns from file (use - to read from stdin) 88 --metadata-filter stringArray Add a metadata filtering rule 89 --metadata-filter-from stringArray Read metadata filtering patterns from a file (use - to read from stdin) 90 --metadata-include stringArray Include metadatas matching pattern 91 --metadata-include-from stringArray Read metadata include patterns from file (use - to read from stdin) 92 --min-age Duration Only transfer files older than this in s or suffix ms|s|m|h|d|w|M|y (default off) 93 --min-size SizeSuffix Only transfer files bigger than this in KiB or suffix B|K|M|G|T|P (default off) 94 ``` 95 96 ## Listing Options 97 98 Flags for listing directories. 99 100 ``` 101 --default-time Time Time to show if modtime is unknown for files and directories (default 2000-01-01T00:00:00Z) 102 --fast-list Use recursive list if available; uses more memory but fewer transactions 103 ``` 104 105 See the [global flags page](/flags/) for global options not listed here. 106 107 # SEE ALSO 108 109 * [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends. 110