0

I'm trying to empty my trash using the UI but it doesn't work. i tried to use this command rm -rf ~/.local/share/Trash/* but it does not success with messages like rm: cannot remove 'file.txt': Read-only file system. any solution

  • how are you running Ubuntu? live usb, dual-boot? I've seen where recent Windows upgrades are flipping "fast-boot" back on and locking up drives... – bgregs Nov 8 '18 at 18:55
  • @bgregs dual boot – Achraf Nov 8 '18 at 19:09
  • Did you look into the fast-boot issue? Found it documented here: answers.launchpad.net/ubuntu/+question/668204 – bgregs Nov 8 '18 at 19:15
  • i have discovered that all files on linux are only read not only trush – Achraf Nov 9 '18 at 8:53
  • 1
    @GAD3R all files a es owned by my user – Achraf Nov 9 '18 at 9:11
1

The ~/.local/share/Trash directory contains 2 sub-directories, files and info. When you move something into the trash using the GUI, it actually moves it into the files sub-directory, and may put some meta-info into the info sub-directory. So, if you want to remove items in the Trash from the command line, you really want to do

rm -rf ~/.local/share/Trash/*/*
  • same probleme rm: cannot remove 'file.txt': Read-only file system. any solution i think it's a permission probleme i have only read accesson that dir – Achraf Nov 8 '18 at 18:44
  • Is there a file.txt.trashinfo file in ~/.local/share/Trash/info? If so, what is in there for the Path? – Lewis M Nov 8 '18 at 18:46
  • rm: cannot remove '/home/achraf/.local/share/Trash/info/labd-1.tgz.trashinfo': Read-only file system here is an example . – Achraf Nov 8 '18 at 18:51
  • Where is /home/achraf/.local/share/Trash/info located? Is it a NFS share, CIFS share, local directory? There might be some permissions problem with a share preventing you from deleting it. If it is local, you may want to run the mount command to see if it is just your local directory that is read-only, or if other filesystems are mounted read-only. There might be an issue with your system. – Lewis M Nov 8 '18 at 18:56

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.