0

I am fairly new to Linux, Ubuntu, etc. I am running LUbuntu 18.04.5 on an i386 machine. Please note that I need to be given explicit instructions whenever I have to use Terminal (command line).

I want to use Terminal to access an external USB HDD (which has NTFS file system) and then manually empty the trash folder there - and I don't know how to even begin doing that. My parallel attempt to add an 'Empty Trash' item to the right-click-menu in the GUI of the file manager (which is PCManFM 1.2.5) has been unsuccessful so far. (See How do you access an external USB hard drive and empty its Trash folder? ).

What Terminal commands can I use for accessing the external HDD and then manually emptying the trash folder there (which is named .Trash-1000)?

5
  • 2
    Why complicate things needlessly? You can just delete the .Trash-1000 folder, it will be recreated automatically next time something is deleted. – mikewhatever Jan 17 at 19:52
  • I love that! Thank you, mikewhatever. – Hotspur Jan 17 at 21:18
  • The way for me to do that appears to be Edit/remove (in the top menu of the file manager), after highlighting the trash folder. I see no option labeled 'delete', even by right-clicking on the trash folder. – Hotspur Jan 17 at 21:28
  • Oh, oh. When I do Edit/remove (from the top menu in the file manager), the following error occurs. "The file operation was completed with errors. Deleting file: ,Trash-1000, Errors occurred: duplicity-full.20200224T230311Z.vol3388.difftar.gz: Error removing file /media/paul/My Passport/.Trash-1000/files/Paul/duplicity-full.20200224T230311Z.vol3388.difftar.gz: Input/output error". And the trash folder is still 2/3 the size it was before the remove operation. – Hotspur Jan 18 at 5:40
  • It looks like there are files there not owned by your user. No worries, now that we know the path, you can use the following to empty the .Trash-1000 folder: sudo rm -r /media/paul/My Passport/.Trash-1000 – mikewhatever Jan 18 at 15:49
1

Eventually, I succeeded in removing the trash folder (from the external USB HDD), using the method suggested in the above comment by 'mikewhatever' - which was to select the "remove" menu-item after right-clicking on the trash folder.

I'm postulating that this eventual success was enabled when I turned off the automatic-backup option in the backup program that I use. The external HDD was almost full, and I'm guessing that before I turned off automatic-backups, my attempts to remove the trash folder failed because the process of removing the trash folder was not completing before the backup program wrote more onto the HDD, thereby filling the HDD completely full, thereby causing termination of the process of removing the trash folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.