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 how to get help
bmike1
Level 4
Level 4
Posts: 456
Joined: Mon Nov 28, 2011 1:13 am

can't delete files in trash

Postby bmike1 » 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?
Home brewed computer. Mint17.3 on Quad core AMD Athlon II X4 620 (-MCP-) CPU. GA-MA785G-UD3H board. Advanced Micro Devices [AMD/ATI] RV770 [Radeon HD 4850] X.Org: 1.15.1 video. 500 watt Antec SmartPower 2.0 power supply.

User avatar
overthetop
Level 4
Level 4
Posts: 366
Joined: Thu Oct 06, 2011 10:25 am
Location: /home/overthetop

Re: can't delete files in trash

Postby overthetop » 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
xenopeek
Level 23
Level 23
Posts: 19238
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: can't delete files in trash

Postby xenopeek » 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.
Image

bmike1
Level 4
Level 4
Posts: 456
Joined: Mon Nov 28, 2011 1:13 am

Re: can't delete files in trash

Postby bmike1 » 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:~$
Home brewed computer. Mint17.3 on Quad core AMD Athlon II X4 620 (-MCP-) CPU. GA-MA785G-UD3H board. Advanced Micro Devices [AMD/ATI] RV770 [Radeon HD 4850] X.Org: 1.15.1 video. 500 watt Antec SmartPower 2.0 power supply.

User avatar
xenopeek
Level 23
Level 23
Posts: 19238
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: can't delete files in trash

Postby xenopeek » 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.
Image

User avatar
DrHu
Level 17
Level 17
Posts: 7561
Joined: Wed Jun 17, 2009 8:20 pm

Re: can't delete files in trash

Postby DrHu » 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..

bmike1
Level 4
Level 4
Posts: 456
Joined: Mon Nov 28, 2011 1:13 am

Re: can't delete files in trash

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

thanks for the help guys!
Home brewed computer. Mint17.3 on Quad core AMD Athlon II X4 620 (-MCP-) CPU. GA-MA785G-UD3H board. Advanced Micro Devices [AMD/ATI] RV770 [Radeon HD 4850] X.Org: 1.15.1 video. 500 watt Antec SmartPower 2.0 power supply.


Return to “Other topics”

Who is online

Users browsing this forum: No registered users and 2 guests