System
ADB Debugging
Package Manager
Logcat
Wireless
File Manager
ScreenShot
Network
logcat
This command is used to remove the specified directory
adb shell rm -f /path/to/directory
Forcefully remove without asking for confirmation. Won't throw any error if the file does not exist.
adb shell rm -f /mnt/sdcard/Download/test.apk
adb shell rm -i /path/to/directory
Interactively prompt for confirmation.
adb shell rm -i /mnt/sdcard/Download/test.apk
adb shell rm -rR /path/to/directory
Recursively remove directory contents.
adb shell rm -rR /mnt/sdcard/Download/test.apk
adb shell rm -v /path/to/directory
Verbose.
adb shell rm -v /mnt/sdcard/Download/test.apk
adb shell rm /path/to/directory
Frequently Asked Questions
It is a command to remove a directory and its contents.
If you use the adb shell rm command, you will get a prompt if you try to delete a non-existant file but in case you are forcefully deleting using the adb shell rm -f command, you won't be getting any prompts.
To remove files without confirming everytime, use the adb shell rm -f command.