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...– bgregsNov 8, 2018 at 18:55
-
@bgregs dual boot– AchrafNov 8, 2018 at 19:09
-
Did you look into the fast-boot issue? Found it documented here: answers.launchpad.net/ubuntu/+question/668204– bgregsNov 8, 2018 at 19:15
-
i have discovered that all files on linux are only read not only trush– AchrafNov 9, 2018 at 8:53
-
1@GAD3R all files a es owned by my user– AchrafNov 9, 2018 at 9:11
1 Answer
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– AchrafNov 8, 2018 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 MNov 8, 2018 at 18:46
-
rm: cannot remove '/home/achraf/.local/share/Trash/info/labd-1.tgz.trashinfo': Read-only file system
here is an example .– AchrafNov 8, 2018 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 MNov 8, 2018 at 18:56