can't delete files in trash

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

can't delete files in trash

Postby bmike1 on Wed Dec 12, 2012 4:39 pm

I run mint 13 and there are things in the trash bin that won't remove. The status bar appears and everything disappears except 13 folders (that are empty). Where is the trash bin in the network tree?
Mint17 Mate- Running on a Dell Dimension C521 with a AMD Athlon(tm) 64 Processor 3200+ CPU, containing 4G of memory, and a GeForce 6150 LE video card
bmike1
Level 4
Level 4
 
Posts: 367
Joined: Mon Nov 28, 2011 1:13 am

Linux Mint is funded by ads and donations.
 

Re: can't delete files in trash

Postby overthetop on Wed Dec 12, 2012 5:20 pm

Try
Code: Select all
sudo rm -rf ~/.local/share/Trash/files/* ~/.local/share/Trash/info/*
Image
"A wise man can learn more from a foolish question than a fool can learn from a wise answer." -- Bruce Lee
User avatar
overthetop
Level 4
Level 4
 
Posts: 368
Joined: Thu Oct 06, 2011 10:25 am
Location: /home/overthetop

Re: can't delete files in trash

Postby xenopeek on Wed Dec 12, 2012 5:28 pm

There may be some files or folders in your trash that you don't own and so can't empty from the trash. Open a terminal and run the following command, to change ownership of everything in the trash to yourself. You should then be able to empty the trash. You can copy text to/from the terminal, see its Edit menu.
Code: Select all
sudo chown -cR $(id -un):$(id -gn) ~/.local/share/Trash/@(files|info)/*


Edit: you may also try overthetop's command. When I tried that just now it did delete files in my trash, but when I then opened my trash in the file browser the files were still there. Hence my more cautious approach. overthetop's command may work fine, but you may have to log out and log in again to clear any confusion your file browser may have over the state of the trash.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14995
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: can't delete files in trash

Postby bmike1 on Thu Dec 13, 2012 1:31 pm

Thanks for the quick responses.
Vincet, your command errored out while overthetop's command didn't do anything.
After looking at your explanation again it seems I'll have to log out/in for the changes to take effect but I don't want to do that yet

bmike1@Michaels-Laptop:~$ sudo chown -cR ${id -un}:${id -gn} ~/.local/share/Trash/@(files|info)/*
bash: ${id -un}:${id -gn}: bad substitution
bmike1@Michaels-Laptop:~$ sudo rm -rf ~/.local/share/Trash/files/* ~/.local/share/Trash/info/*
[sudo] password for bmike1:
bmike1@Michaels-Laptop:~$
Mint17 Mate- Running on a Dell Dimension C521 with a AMD Athlon(tm) 64 Processor 3200+ CPU, containing 4G of memory, and a GeForce 6150 LE video card
bmike1
Level 4
Level 4
 
Posts: 367
Joined: Mon Nov 28, 2011 1:13 am

Re: can't delete files in trash

Postby xenopeek on Thu Dec 13, 2012 1:41 pm

Doh. Typo on my end. I've corrected the command in my post above.

But the overthetop's command should have cleared your Trash, though you can't see it yet as your file browser has a cache.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14995
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: can't delete files in trash

Postby DrHu on Thu Dec 13, 2012 1:52 pm

If you have deleted the files in your trash folder, but they still appear in your file manager
--you probably at least have to logout/login to get a new session for the file manager with the updated status of your trash folder..
    You could also crash/restart the Xserver (ctrl alt bksp key combination); it should require a re-login of the session..
User avatar
DrHu
Level 16
Level 16
 
Posts: 6898
Joined: Wed Jun 17, 2009 8:20 pm

Re: can't delete files in trash

Postby bmike1 on Mon Jan 28, 2013 3:03 pm

thanks for the help guys!
Mint17 Mate- Running on a Dell Dimension C521 with a AMD Athlon(tm) 64 Processor 3200+ CPU, containing 4G of memory, and a GeForce 6150 LE video card
bmike1
Level 4
Level 4
 
Posts: 367
Joined: Mon Nov 28, 2011 1:13 am

Linux Mint is funded by ads and donations.
 

Return to Other topics

Who is online

Users browsing this forum: No registered users and 5 guests