Cannot delete Trash folder from external drive

I had to reformat my drive so I backed up my home folders to an external drive while booted in a Live USB. I successfully re-installed UM 18.04 to my drive after formatting and no longer need the copy of the files in the external drive. So I deleted them using Caja and they got moved to .Trash-999 in the external drive. I need the space for other things... well, actually my wife does. However when I try to delete .Trash-999 it just creats another .Trash-xxxx folder. I did this several times and now I am getting:

There was an error getting information about the files in the folder "foldername"

Show more details shows a looong file path to a folder with this message:
Error when getting information for file "/media..../foldername/Documents:input/output error"

I am looking for a solution that does not mean having to reformat the external drive.

Can anyone help?

Have you accessed the external drive as root and tried to delete the trash can? Also, if you delete it and UM replaces it with another trash can, is the replacement empty? If it is, then you have got your space back and can ignore its presence.

If you want to permanently delete stuff from usb or external drive use Shift+Delete to remove files, that way they don't go to trash and you get your empty space back.

1 Like

Yes. The trash can doesn't get deleted because I get "Error while deleting" and can only choose Cancel or Skip.

Try this in the terminal:
rm -rf /path/to/.trash-xxxx/*
rm is remove
the r option is for recursive (so it deletes all the subdirectories and files)
the f option is for force
the * is there to delete everything inside .trash-xxxx except the folder itself.

You might need to add sudo to the beginning of the command.

Also, make sure the path is correct or else R.I.P. data. What you delete with rm will not go into a trash, so recovery is more difficult.

All the other recommendations are good recommendations, but we all have our own way. Using Caja, I right click in the window and open as Administrator, then delete the trash folder. If you delete the non-admin trash folder, the folder simply goes into the Admin trash folder. Then you delete the admin trash folder for a complete delete of trash.