Cannot empty Trash folder
Since I installed Ubuntu 11.10 on a 8GB pendrive, I need free disk space, but I Cannot empty Trash folder!
sudo rm -r /root/.local/share/Trash/files rm: impossible remove "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7/9A/85658d01": input/output error rm: impossible remove "/root/.local/share/Trash/files/danieluvi/.cache/dconf/user": is a directory |
Code:
rm -rf /root/.local/share/Trash/* |
Quote:
Doesn't work. The folder is still full. Code:
~$ sudo rm -rf /root/.local/share/Trash/* |
And it didn't show any error messages?
|
No! Any error message.
That's strange, isn't it? |
I have no idea what's wrong, then. Maybe someone else has an idea of what might be wrong?
|
An italian forum told me this:
Code:
sudo -s Code:
~# rm -r /root/.local/share/Trash/* |
Here's an idea: Delete .trash
Is it possible to just do that, and make a new functioning .trash afterwards? Sorry if I am making more problems then solving, But that seems like the simplest to me. |
Quote:
|
In Debian, I cannot do the same from command line as sudo. The thing is, this is in the /root home directory. From what I remember, you cannot operate as root in Ubuntu, at least not from command line, sudo just gives the user superuser rights. So how does files end up in the root's home directory?
Probably by using software as superuser. For instance, I have KDE, and kdesudo installed, by issueing command: kdesudo dolphin, the kde file manager appears after entering my user password. When I delete a file from the file manager as my user with superuser rights, the file will be in /root/.local/share/Trash/files. To empty it, I start the file manager dolphin as superuser again and navigate to the /root/.local/share/Trash/files directory, right click on the file and delete it and it disappears along with the corresponding text file in /root/.local/share/Trash/info folder. Because this is Debian, I can also just su to root and remove them from command line, but I don't think you can do that in Ubuntu. Use nautilus as superuser. gksudo nautilus |
You can totally use root in ubuntu ... Easiest thing ever (just not recommended for most purposes):
Open a terminal an type: sudo passwd You will get this in return: Code:
enter sudo password for user For username put in root. for the password, whatever you chose at Enter New Unix Password: I'm not 100% but I would guess the trash gets stored under Root because it is a SYSTEM folder, and root is in charge of the system ... Giving it jurisdiction if you will. Of course this is just a guess ... but sounds logical to me :) edit: not saying everyone should change the fact they can't be root, you can do what needs to be done with sudo just fine ... Just stating it is possible. |
Quote:
In an italian forum I found this "partial" solution, but there are still error messages and undeletable files or directory: Code:
sudo find /root/.local/share/Trash/files -mindepth 1 -exec rm -ri {} \; Code:
$ sudo find /root/.local/share/Trash/files -mindepth 1 -exec rm -ri {} \;rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi"? S |
Maybe you don't have permission to remove them? Try posting the "ls -l" output on the files that have error messages above.
Also, it would be helpful to know what the error messages actually say (I don't know that language, and I can't use a translator without knowing what it is). |
Quote:
entrare=enter impossibile=impossible rimuovere=remove directory=directory accedere=access Here the output of ls -l non esistente=not existing Code:
sudo ls -l /root/.local/share/Trash/files/danieluvi/.cache/dconf/user Code:
:~$ sudo find /root/.local/share/Trash/files/danieluvi/.cache/dconf/user -mindepth 1 -exec rm -ri {} \; |
Could the "input/output error" indicate a corruption in filesystem or a bad disk?
|
Quote:
Any solution? I've read something about fsck, fdisk, debugfs but I don't know how use those command, do you? Thanks. |
To run fsck (File System ChecK) on your root (/) partition, first of all you need to mount in read-only. In order to do that, I first enter runlevel 1. Type on a terminal
Code:
# telinit 1 Code:
# mount / -o remount,ro Code:
# fsck -f -v /dev/sda1 Code:
# mount / -o remount,rw |
Quote:
For instance, how could I know "my root partition is sda1" ? If I call mount: Code:
mount I do not understand where is root mounted. I try this: Code:
~$ df -h Thanks. |
I tried.
telinit 1 and then mount / -o remount,ro then fsck -f -v /cow I got error: fsck.ext2 in /cow not exist or something like this since I was in terminal out of ubuntu could not copy the output. I tried also fsck -f -v / and got: fsck.overlayfs not exist |
Open a terminal and enter this: gksu nautilus or gksudo nautilus. Navigate to your Trash folder and open the files and info folders separately or whatever you want to delete. You can Select All or select individually to highlight files. When you have them highlighted, hold down the Shift and Delete keys and you will be prompted and asked if you want to delete whatever files are highlighted. I've done this on Ubuntu 10.10 and 11.10 and I think I found this solution on the Ubuntu forums after trying several of the standard methods suggested above which didn't work either??
|
Quote:
This is the error message: Error finding file stat "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7/9A/85658d01": input/output error |
Hello,
Maybe the file is in use. Go into single user mode, then try it. init 1 will goto into single user mode. cheers |
Quote:
But I restarted as single user and the input-output error is still there, impossible remove. Well ubuntu is keeping well hidden its secrets :-) |
Indeed your root partition is /cow, although I would expect /dev/something. Maybe
Code:
# fdisk -l |
Another suggestion.
I just ran another test and put a photo called "Wolf.jpg" in the trash through my file manager dolphin. Based on the test I did from command line posted below, I had to specify the name of the file, using a wild card did not work. Code:
jo@jo:~$ sudo rm /root/.local/share/Trash/files/* |
Quote:
it's not an "elegant solution", but it might be a workaround... ;) good luck! :) |
what is the answer of lsattr 'filename'
|
All times are GMT -5. The time now is 07:50 PM. |