[SOLVED] Can't empty my /root/.local/Trash - need too badly
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Can't empty my /root/.local/Trash - need too badly
Have tried to do this a number of ways including remotely from another install.
If doing it locally I just get duplicate files generated in the bugger.
If doing it remotely I get a new .Trash generated in the / directory.
I am running Sid with xfce.
This problem also happens on my testing install.
Before you ask I will tell you that the reason for so much being in there is removal of a lot of files that had to do with other DEs that were not removed when the extra DEs were removed.
As this install has been here for some time this trash has accumulated to just under 9g. Trying to remove it has at least doubled the ammount in there so I have not really deleted that ammount of files.
I attempted, on a temporary install, changing the permissions to the user rather than root. This did not help in the least. Same results.
Any suggestions will be tried out, at least on some poor install that is only there to take abuse.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Original Poster
Rep:
Quote:
Originally Posted by Dutch Master
Log in into single-user mode, you'll get to the cli, then su into the root account. Then, issue the following command (copy/paste to prevent errors):
Code:
cd / && rm -R /root/.local/Trash && touch /root/.local/Trash
Check if it's gone:
Code:
ls -l /root/.local/Trash
The file should be empty (size=0), if not, report back the exact error code... If it worked, reboot by simply entering the "reboot" command.
Sounds good, will give that a whack.
Be a bit before I can do that. Have a large download going for Mageia 3 alpha 2 and have to go to work for a couple hours anyway to fill the spray truck.
Will be this evening though. I will definitely be reporting back.
...
As this install has been here for some time this trash has accumulated to just under 9g. Trying to remove it has at least doubled the ammount in there so I have not really deleted that ammount of files.
.
cd / && rm -R /root/.local/Trash && touch /root/.local/Trash
...that should work if it resides there and actually is a file and not, as I think it would be, a directory residing in $HOME/.local/share/. Unfortunately you've IMHO missed an opportunity to address the more important part. AFAIK $HOME/.local/ is the location where Desktop Environment-related applications have their files. This suggests the OP runs a DE as root user which should be discouraged for various reasons.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Original Poster
Rep:
Quote:
Originally Posted by unSpawn
...that should work if it resides there and actually is a file and not, as I think it would be, a directory residing in $HOME/.local/share/. Unfortunately you've IMHO missed an opportunity to address the more important part. AFAIK $HOME/.local/ is the location where Desktop Environment-related applications have their files. This suggests the OP runs a DE as root user which should be discouraged for various reasons.
Have not had time to fool with this yet, still downloading.
As for running as root, this is not the case. This is the root trash. I have no trouble with user land trash.
This is trash from / not /home.
These are files that were left over from Gnome when I switched to Xfce. I did not use purge as there were some things I wanted left. The files removed by going in and deleting them were not orphanned and so did not show up as removable. Many were recommends that I should not have installed in the first place.
I also had 6 Ubuntu ISOs in a directory that I created. Grub will boot ISOs if they have the correct hooks and some if you modify them correctly (haven't had any success with Debian yet). Ubuntu ISOs boot great from grub. Boots up about as fast as an install and also works about as fast. Not having any use for them I deleted them. ISOs are large files and this adds up pretty quickly.
I also have created a /usr/share/backgrounds directory, a legacy of using Ubuntu. This is convinient as I can put images there and easily move them to /usr/xfce4/backdrops for use as wallpaper. Occasionally I go through them and prune. Images also add up pretty quickly.
Also have a bad habit of collecting themes and icon sets. Even I have to admit that some of these need to go as they have never been used. These also add up.
Basically I need to do some more clean up and can't be having this much stuff just move to another file that I can't get rid of.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Original Poster
Rep:
Not going to get to this tonight. Download is huge and slow.
Have to be at work a 6:30AM tomorrow too.
Did try and see if I could effect the testing installs (not near as bad as this one) / trash in chroot. Did not work.
Claimed there was no such file or directory. I can find them fine in Thunar.
Realizing after trying that I did not need to cd to / when I was already there in my chroot, installed on / and /home, I cut that part of the command out but it made no difference.
That is an interesting case over on testing as I just used a rm command, while logged into that install, to remove the /.local/Trash. It worked. Created a /.Trash directory and moved every thing there.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Original Poster
Rep:
This is true.
It is fairly easy to get access to create say a /etc/aa directory to store Live images for booting.
On the other hand, unless you are installed on one partition (/) you will not be booting those images with grub. They must be in a / partition as that is the only place that grub will recognize them.
If you are using grub-pc and want to use the /etc/grub.d/40_custom file as intended you need to put your custom entries in it and then save that file as something like 06_custom. This will put the menuentry(s) at the top of the screen menu.
If all you use is custom entries, which makes the screen menu come up a lot faster if you are multi booting, you may not want to have all menu items available at all times, such as ISO menu entries. In that case you once more populate 40_custom with those entries and save it as 07_custom. Now when you boot, if 06 and 07 are enabled to execute, you will have the 06 menu entries on top and the 07 entries on the bottom of the screen menu.
If you are not playing with or installing Live images there is no sense in having them on the menu. Disable 07 and then the ISO entries are not there (after, of coarse, running update-grub). The same is true if you are, for some reason, not going to be booting to an install for a day or two. Leave 07 and disable 06.
You may wish to boot to another drive sometimes. In which case a 08_custom file can hold those entries for those times.
There are many other reasons you may wish to create files and even directories in /. Or remove them for that matter.
It is impossible to set up a remastersys ISO without adding directories to /etc/skel. If you want to modify the way a new users /home/<user name> is set up you need to modify or add or remove some of the /root/.hidden files.
These are all perfectly valid reasons to be doing these things.
What is strange here is the refusal of the root trash to refuse to be permenantly deleted. Works in Squeeze, at least on my installs of Gnome and OpenBox Squeeze.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Original Poster
Rep:
I finally gave up on the download. Got most of it but I think my connection is too slow for their server. Believe it timed me out.
Been busier than a one armed paper hanger at work but think I will get to this tonight. Just popped in at home for a quick bite. Need to get anti freeze in the spray rigs as it is supposed to be 21 degrees (F) tonight. Have 3 200 gallon rigs, one that needs cleaned out first and 2 25 gallon rigs for four wheelers that need protected, one of them also needs removed from the 4 wheeler it is mounted on. Tried to tell the boss we needed to do this a couple days ago but that didn't fly. It will get done though and everything will be fine.
If the commands don't do the job I seriously doubt that bleachbit would either. It would have at least as much trouble with permissions as core linux command line commands will. Will keep it in mind though. Have never felt the need to use it. Might be fun to try it out.
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Original Poster
Rep:
What fun, an 12 hour work day.
More FUN, coming home whipped and getting rid of a bunch of reluctant root owned trash files. Had a /root/.local/share/Trash. Gone. Had a /.Trash-0. Gone.
And for some reason had a /home/.Trash-0 that I had never seen before. Gone.
Just like that I have 23.38Gib unused in / according to gparted. Was something like 8.
@Dutch Master
The next time you are in Montana, or even close, I really owe you a brew or 4. Thanks a bunch. Have tried this before and it didn't work. Was just using "rm" and it just moved stuff to that /.Trash-0. The "-R" seems to have been the key here.
Just booted to an OpenBox root session and things went great. Better get out of here before I "improve" something.
Glad you solved it, though it's unlikely you'll find me in Montana anytime soon The -R option is recursive, it deletes all files, no questions asked, no backups/un-delete options or whatever. You should have found it if you studied the man page for rm
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Original Poster
Rep:
Quote:
Originally Posted by Dutch Master
Glad you solved it, though it's unlikely you'll find me in Montana anytime soon The -R option is recursive, it deletes all files, no questions asked, no backups/un-delete options or whatever. You should have found it if you studied the man page for rm
Yes I should have and even wondered about it because of its use with chown. Just getting slow in my old age I guess (good excuses are hard to come by).
Thanks again.
Hopefully will not need to be doing this again. Used several DEs trying them out intensively when switching away from Gnome. Between that an the ISOs it added right up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.