Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34

Thread: How To: Disk Full? - Check Your Trash

  1. #21
    Join Date
    Jun 2010
    Location
    Mist
    Beans
    53
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How To: Disk Full? - Check Your Trash

    By running:
    Code:
    sudo find / -type d -name "*Trash*"
    or
    Code:
    sudo find / -type d -iname *Trash* | grep Trash
    or
    Code:
    sudo find / -type d -iname *Trash*
    I get nothing. The only thing that happens is that I get the prompt back (the me@wherever:~$ thing)

    What's up with that? I've no need to clean up these Trash folders now, but it's cool to find stuff anyway
    Dell Inspiron 1501, AMD Athlon(tm) 64 X2 Dual-Core Processor TK-53, ATI Radeon Xpress 200M, Broadcom BCM4311 802.11b/g WLAN, 120GB SATA (Windows 7/Ubuntu Precise dual boot), 2GB DIMM DRAM, SBx00 Azalia (Intel HDA)

  2. #22
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How To: Disk Full? - Check Your Trash

    Quote Originally Posted by GrogTheDreamer View Post
    What's up with that? I've no need to clean up these Trash folders now, but it's cool to find stuff anyway
    I don't know. Even if you don't have Trash folders my search using the last command comes up with several trashapplet hits. You could replace *Trash* with the name of a filename you know exists just to see if the command works on other names.
    Back to Xorg...

    Retired.

  3. #23
    Join Date
    May 2010
    Location
    New Zealand
    Beans
    94
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How To: Disk Full? - Check Your Trash

    for some reason every time I try to delete the files in /home/.trash-0 as root they just re-appear when using the file manager. by using the terminal it works fine, but not using the GUI. also, why does this trash folder contain files that I deleted ages ago, and I also emptied them from my trash (or so I thought).

  4. #24
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How To: Disk Full? - Check Your Trash

    Quote Originally Posted by sundays211 View Post
    for some reason every time I try to delete the files in /home/.trash-0 as root they just re-appear when using the file manager. by using the terminal it works fine, but not using the GUI. also, why does this trash folder contain files that I deleted ages ago, and I also emptied them from my trash (or so I thought).
    To permanently remove trash from the trash bin folders Nautilus you have to use SHIFT-DEL instead of just DEL. When you press just the DEL key, the files are deleted but then return to the same location a few moments later. Whether this is by design or not I don't know. When you use the SHIFT-DEL method, the files are removed permanently.

    There is an option in Nautilus under Edit > Preferences which includes adding a DEL option which bypasses the Trash bin. If you are using that and the files still end up in the Trash, it could be a bug and you should probably see if it's been reported in Launchpad.

    For the second question, emptying the Trash bin used to only include the trash in the Ubuntu/linux trash bin (~/.local/share/Trash and, as root, /root/.local/share/Trash ). This trash bin contains deleted files from your linux partition(s) and did not include trash from other filesystems (FAT, NTFS, etc), which are stored in separate folders (such as .Trash-0). I thought that the newer releases of Ubuntu had provisions for this or there was a workaround but can't say for sure without doing some research.
    Back to Xorg...

    Retired.

  5. #25
    Join Date
    May 2010
    Location
    New Zealand
    Beans
    94
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How To: Disk Full? - Check Your Trash

    thanks
    SHIFT-DEL permanently removes the files. and now that I think about it, all those files appear to be from my "data" drive, which is not permanently mounted.
    anyways, your guide was a lot of help. I was very close to re-installing everything because my /home partion was nearly full of these files.

  6. #26
    Join Date
    Dec 2009
    Location
    Michigan, USA
    Beans
    19
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How To: Disk Full? - Check Your Trash

    Thanks! Very easy to follow - not only solved my problem but I learned a lot.

  7. #27
    Join Date
    Jul 2006
    Location
    surrounded by cornfileds
    Beans
    Hidden!
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: How To: Disk Full? - Check Your Trash

    Excellent guide, thanks much.

    After following relevant topics here and recovering about 4% of /, I discovered that files I had deleted were still taking up space despite not being accessible.
    Thanks to some mailing list help, I ran "sudo lsof / grep '(deleted)'"
    and found over 20G of recoverable space.
    Once I knew the problem I simply killed the process IDs for each file and / was back to 20% use.

  8. #28
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How To: Disk Full? - Check Your Trash

    Quote Originally Posted by meanmrmustard View Post
    Excellent guide, thanks much.

    After following relevant topics here and recovering about 4% of /, I discovered that files I had deleted were still taking up space despite not being accessible.
    Thanks to some mailing list help, I ran "sudo lsof / grep '(deleted)'"
    and found over 20G of recoverable space.
    Once I knew the problem I simply killed the process IDs for each file and / was back to 20% use.
    Thanks for sharing the command.

    If you would elaborate a bit perhaps I could add it to the original post.

    Didn't using SHIFT-DEL in a root browser work to permanently remove the files, or were they not visible even in the browser?

    Also, although I don't type the complete command here lest someone makes a mistake and erases their entire OS, did you try the 'rm' command as root to remove files from root's trash bin (/root/.local/share/Trash)?

    Finally, once you used the lsof command, how exactly did you use the results to remove files which weren't removed via other methods.

    Thanks again for posting.
    Back to Xorg...

    Retired.

  9. #29
    Join Date
    Jul 2006
    Location
    surrounded by cornfileds
    Beans
    Hidden!
    Distro
    Kubuntu 16.04 Xenial Xerus

    Re: How To: Disk Full? - Check Your Trash

    Quote Originally Posted by drs305 View Post
    Thanks for sharing the command.

    If you would elaborate a bit perhaps I could add it to the original post.

    Didn't using SHIFT-DEL in a root browser work to permanently remove the files, or were they not visible even in the browser?

    Also, although I don't type the complete command here lest someone makes a mistake and erases their entire OS, did you try the 'rm' command as root to remove files from root's trash bin (/root/.local/share/Trash)?

    Finally, once you used the lsof command, how exactly did you use the results to remove files which weren't removed via other methods.

    Thanks again for posting.
    First, I'm sorry, I mis-typed the command.
    It is actually "sudo lsof / | grep deleted" which is non-destructive and only searches "/" to find any files marked "(deleted)".


    For whatever reason these files, although deleted, were still claiming space on the root partition.

    The "sudo df -h /" command showed / as being 26G
    but running "sudo du -xhs /" showed the actual size, around 5G.

    According to my helper, this showed that, "most likely" there were deleted files still occupying space.
    I think it may also have been important that other partitions (all but / and /home)were unmounted before running all commands.

    These files were not visible using nautilus or vim as root.

    I was told that all I needed to do was to kill each program to reclaim the space.
    I did this by running "top" then entering "k" followed by each PID - which was shown in the second column of the result of the "lsof..." command, the first column shows the program name.

    I just ran it again to show an example of the output:
    chromium- 21460 curt 558u REG 8,1 4104 687586 /var/tmp/etilqs_UZLJE6m0NTfoQj1 (deleted)

    Only guessing but I believe the files in /var would have disappeared had I simply re-booted.

    The command found over 20G of files in /tmp, /usr/share/applications, /var/tmp and /var/lib.
    I have no understanding of how these files were created or why they remained after being deleted.
    Maybe someone can enlighten me.

    Root's trash was removed using <shift> <delete>... and no, I didn't try "rm" to remove them.

    Another helper suggested installing ncdu (Ncurses Disk Usage, more info at http://dev/yorhel.nl/ncdu) which gives more accurate info in an easy to read format.
    The command "sudo ncdu -x /" showed the contents of the / partition - the switch "-x" limits the search, in this case to "/" only.

    Hope my explanation was clear.
    Last edited by meanmrmustard; December 22nd, 2011 at 12:03 PM. Reason: tiny error and a clarification

  10. #30
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How To: Disk Full? - Check Your Trash

    Quote Originally Posted by meanmrmustard View Post
    Hope my explanation was clear.
    Yes, thanks. I'll digest them when I have a bit of time.

    Happy Holidays.
    Back to Xorg...

    Retired.

Page 3 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •