LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot empty Trash folder (http://www.linuxquestions.org/questions/linux-newbie-8/cannot-empty-trash-folder-916794/)

passegua 12-02-2011 12:36 PM

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

MTK358 12-02-2011 02:34 PM

Code:

rm -rf /root/.local/share/Trash/*

passegua 12-02-2011 02:51 PM

Quote:

Originally Posted by MTK358 (Post 4540464)
Code:

rm -rf /root/.local/share/Trash/*


Doesn't work.

The folder is still full.

Code:

~$ sudo rm -rf /root/.local/share/Trash/*
~$ sudo dir /root/.local/share/Trash/
files  info

Thanks.

MTK358 12-02-2011 02:59 PM

And it didn't show any error messages?

passegua 12-02-2011 03:07 PM

No! Any error message.
That's strange, isn't it?

MTK358 12-02-2011 03:09 PM

I have no idea what's wrong, then. Maybe someone else has an idea of what might be wrong?

passegua 12-02-2011 03:29 PM

An italian forum told me this:

Code:

sudo -s
 rm -r /root/.local/share/Trash/*

it works for all but still something left:

Code:

~#  rm -r /root/.local/share/Trash/*
rm: impossible remove "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7/9A/85658d01": Error input/output
rm: impossible rimove "/root/.local/share/Trash/files/danieluvi/.cache/dconf/user": is a directory


Hevithan 12-02-2011 03:32 PM

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.

passegua 12-02-2011 03:35 PM

Quote:

Originally Posted by Hevithan (Post 4540505)
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.

I am looking for answers, not for questions :-)

Brains 12-02-2011 05:05 PM

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

Hevithan 12-02-2011 05:19 PM

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
password:
Enter New Unix Password:
Re-Enter Unix Password:
Password Changed ...
#

After that, Log out then select OTHER... at the login screen
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.

passegua 12-03-2011 03:11 AM

Quote:

Originally Posted by MTK358 (Post 4540464)
Code:

rm -rf /root/.local/share/Trash/*

I am still here trying to delete the whole Trash folder.

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
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.mozilla"? S
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox"? S
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default"? S
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache"? S
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7"? S
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7/9A"? S
rm: impossibile rimuovere "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7/9A/85658d01": Errore di input/output
rm: rimuovere directory "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7/9A"? S
rm: impossibile rimuovere "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox/irndj1vf.default/Cache/7/9A": Directory non vuota
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.cache"? S
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.cache/dconf"? S
rm: rimuovere directory "/root/.local/share/Trash/files/danieluvi/.cache/dconf/user"? S
rm: impossibile rimuovere "/root/.local/share/Trash/files/danieluvi/.cache/dconf/user": una directory
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.mozilla"? S
rm: entrare nella directory "/root/.local/share/Trash/files/danieluvi/.mozilla/firefox"?

Please HELP deleting ALL Trash content. Thanks.

MTK358 12-03-2011 07:57 AM

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).

passegua 12-03-2011 12:41 PM

Quote:

Originally Posted by MTK358 (Post 4540969)
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).

Translation:

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
ls: impossibile accedere a /root/.local/share/Trash/files/danieluvi/.cache/dconf/user/85658d01: Errore di input/output
totale 0
-????????? ? ? ? ?                ? 85658d01

sudo dir /root/.local/share/Trash/files/danieluvi/.cache/dconf/user
85658d01

Moreover:
Code:

:~$ sudo find /root/.local/share/Trash/files/danieluvi/.cache/dconf/user -mindepth 1 -exec rm -ri {} \;
rm: impossible remove "/root/.local/share/Trash/files/danieluvi/.cache/dconf/user/85658d01":input/output error


segmentation_fault 12-03-2011 02:39 PM

Could the "input/output error" indicate a corruption in filesystem or a bad disk?


All times are GMT -5. The time now is 09:10 PM.