0

I have some folders and files that do not get deleted in the trash folder.

I logged in as root using sudo su then rm -rf ~/.local/share/Trash/files/* but nothing happens.

Can anyone help with a step-by-step solution please?

2
  • You DO NOT want files in the trash to be deleted? But the rm command you're trying to run is to delete the files. Can you clarify what you're trying to do?
    – Delorean
    Jul 19, 2016 at 14:26
  • I do want the files deleted.
    – FlavioZ
    Jul 19, 2016 at 18:03

1 Answer 1

1

root's Trash directory?

I assume you want to empty your user's trash, not root's. If you "sudo su" then "~" will (probably[0]) expand to "/root", which is unlikely to be what you meant.

Why are you using sudo to do this anyway?

If you need to be root (for some reason) to delete these files, try:

sudo rm /home/<username>/.local/share/Trash/files/*

or similar.

[0] whether it does or not depends on how much of the environment gets inherited when sudo is run, but I think by default it does

2
  • All I get is: rm: cannot remove ‘/home/<my username>/.local/share/Trash/files/pt7sNdLvbt’: Is a directory rm: cannot remove ‘/home/<my username>/.local/share/Trash/files/XMKx-BRJn1’: Is a directory
    – FlavioZ
    Jul 19, 2016 at 17:54
  • rm -rf /home/<username>/.local/share/Trash/files/* .... I.e. the rm -r command is to be used for deleting folders. Jul 19, 2016 at 18:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .