How to delete a locally uploaded file on google colab? How to delete a locally uploaded file on google colab? python-3.x python-3.x

How to delete a locally uploaded file on google colab?


Answer from @Korakot works for a single file and in case, to delete entire folder or subfolders or files

use

!rm -rf <folder_name>


Try this

!rm sample.jpg

Then check that it is gone with !ls -al

Update (nov 2018)Now you can click to open left pane, browse the files tab, then right click to select and delete a file.


To delete a folder which has multiple folders, use:

%rm -rf <folder_name>