LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2011, 12:36 PM   #1
passegua
LQ Newbie
 
Registered: Nov 2011
Location: Barcelona
Distribution: Ubuntu 11.10
Posts: 19

Rep: Reputation: Disabled
Question 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

Last edited by passegua; 12-02-2011 at 02:52 PM.
 
Old 12-02-2011, 02:34 PM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Code:
rm -rf /root/.local/share/Trash/*
 
Old 12-02-2011, 02:51 PM   #3
passegua
LQ Newbie
 
Registered: Nov 2011
Location: Barcelona
Distribution: Ubuntu 11.10
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MTK358 View Post
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.
 
Old 12-02-2011, 02:59 PM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
And it didn't show any error messages?
 
Old 12-02-2011, 03:07 PM   #5
passegua
LQ Newbie
 
Registered: Nov 2011
Location: Barcelona
Distribution: Ubuntu 11.10
Posts: 19

Original Poster
Rep: Reputation: Disabled
No! Any error message.
That's strange, isn't it?
 
Old 12-02-2011, 03:09 PM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I have no idea what's wrong, then. Maybe someone else has an idea of what might be wrong?
 
Old 12-02-2011, 03:29 PM   #7
passegua
LQ Newbie
 
Registered: Nov 2011
Location: Barcelona
Distribution: Ubuntu 11.10
Posts: 19

Original Poster
Rep: Reputation: Disabled
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
 
Old 12-02-2011, 03:32 PM   #8
Hevithan
Member
 
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Blog Entries: 5

Rep: Reputation: 40
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.
 
Old 12-02-2011, 03:35 PM   #9
passegua
LQ Newbie
 
Registered: Nov 2011
Location: Barcelona
Distribution: Ubuntu 11.10
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Hevithan View Post
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 :-)

Last edited by passegua; 12-02-2011 at 03:40 PM.
 
Old 12-02-2011, 05:05 PM   #10
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
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

Last edited by Brains; 12-02-2011 at 05:08 PM. Reason: Added command
 
Old 12-02-2011, 05:19 PM   #11
Hevithan
Member
 
Registered: Apr 2011
Location: Washington State
Distribution: Zorin5-(Ubuntu 11.04) // Backtrack 5-(Ubuntu 10.04) // Dreamlinux 3.5-(Debian)
Posts: 275
Blog Entries: 5

Rep: Reputation: 40
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.

Last edited by Hevithan; 12-02-2011 at 05:22 PM.
 
Old 12-03-2011, 03:11 AM   #12
passegua
LQ Newbie
 
Registered: Nov 2011
Location: Barcelona
Distribution: Ubuntu 11.10
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MTK358 View Post
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.
 
Old 12-03-2011, 07:57 AM   #13
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
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).
 
Old 12-03-2011, 12:41 PM   #14
passegua
LQ Newbie
 
Registered: Nov 2011
Location: Barcelona
Distribution: Ubuntu 11.10
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MTK358 View Post
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

Last edited by passegua; 12-03-2011 at 12:45 PM.
 
Old 12-03-2011, 02:39 PM   #15
segmentation_fault
Member
 
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332

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


Reply

Tags
delete, trash, usb boot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot empty Gnome desktop Trash folder rich16870 Linux - Desktop 13 11-27-2008 12:08 AM
How to open the trash folder and empty the trash in command line cmx08 Linux - Newbie 5 08-29-2008 09:15 AM
Move to trash works beautifully, but empty trash .. different story. kd5eax Mandriva 2 12-04-2007 02:52 PM
Evolution: Can't Empty Trash; Summary and Folder Mismatch snickdog Linux - Software 1 03-17-2007 02:00 PM
Evolution will not empty trash folder azebuski Linux - Software 0 05-25-2004 11:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration