Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: problems with no space left on device

  1. #11
    Join Date
    Dec 2010
    Beans
    26

    Re: problems with no space left on device

    how do i wrap them in code tags?

  2. #12
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    12,130
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: problems with no space left on device

    xap1234; Hi !

    My little it to help and move things along;
    code tag tutorial:
    http://ubuntuforums.org/showthread.p...8#post12776168
    The use of "code tags" really helps us to help you !

    Linux assumes you know exactly what you are doing, a valid command is executed with no back talk or sass ! The system just does what it is told to do.

    Prior to "properly" removing the old un-needed kernels, one must be sure NOT to remove the kernel that one is booting from; and to also keep one additional kernel as a backup in the event there is a problem.
    To see what what the booting kernel is, run the terminal command:
    Code:
    uname -r
    In the event you have difficulties removing those old kernels, by all means let us know so we can help. There are a number of means to remove them; my personal preference is from the terminal, using the package manager's tools.

    hope this helps
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  3. #13
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    4,705
    Distro
    Xubuntu

    Re: problems with no space left on device

    run this command to free up some space
    sudo apt-get autoclean
    that will get you enough to work with to get to the main cause of the problem
    next remove your old kernels (google a guide) you only need the 2 with the highest version numbers
    you can install bleachbit, it is a junk file cleaner
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  4. #14
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    3,507
    Distro
    Xubuntu 17.04 Zesty Zapus

    Re: problems with no space left on device

    If rm did not complain that it couldn't remove the files, it removed them.

    First use
    Code:
    uname -r
    to confirm you are currently booting 3.2.0-57 or 3.2.0-58.

    You have a lot of old header packages installed. These are consuming all your inodes, so you have to uninstall them. Ideally, you'd use the package manager to do so. Using autoremove doesn't work on 12.04 (it does on 13.10, I am told), so you have to do it the old-fashioned way:
    Code:
    sudo dpkg --purge linux-headers-3.2.0-{25..56}{,-generic,-generic-pae}
    It may give you a few warnings about unknown packages or packages not installed, but this should uninstall your header packages, except the two most recent. However, with your package manager already in an inconsistent state, it may not work.

    Before you can uninstall old packages you may have to fix the package manager, to fix the package manager you have to install the latest header package and to install the latest header package you have to uninstall some old ones first. The following solution seems to work.

    First delete some files from the old header packages:
    Code:
    sudo rm -r /usr/src/linux-headers-3.2.0-2*
    This will remove the bulk of the files belonging to header package version 3.2.0-25, 3.2.0-26, 3.2.0-27 and 3.2.0-29 and should free enough inodes to install version 3.2.0-59. Your system will be in an inconsistent state with some installed packages partially removed, which could brake your system if you actually try to use any of those packages. This can lead to the apt hell TheFu is refering too, so you have to be careful and only remove those files and directories, to keep the files properly registered in the package manager, and manually clean-up immediately afterwards.

    Install headers version 3.2.0-59 and fix the package manager at the same time using
    Code:
    sudo apt-get install -f
    Now properly uninstall the old header packages of which you already removed some files, along with the other old packages, using
    Code:
    sudo apt-get purge linux-headers-3.2.0-{25..56}{,-generic,-generic-pae}
    This puts your package manager back into a clean state.

    Given the number of inodes in your boot partition I think you also have a lot of old kernels installed. You can uninstall them with
    Code:
    sudo apt-get purge linux-image-3.2.0-{25..56}-generic
    assuming those are the ones you have installed.
    Last edited by Impavidus; February 23rd, 2014 at 11:56 AM. Reason: Something else to try

  5. #15
    Join Date
    Mar 2010
    Location
    Squidbilly-land
    Beans
    11,372
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: problems with no space left on device

    Code:
    sudo purge linux-headers-3.2.0-{25..56}{,-generic,-generic-pae}
    This is missing aptitude or apt-get. "purge" is an option, not a program. A few of the other example code snips above are missing them too. Simple mistake that I've made too, but confusing to someone not used to CLI.

    I would NOT use rm to delete any package installed files. Always use the package manager.

  6. #16
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    3,507
    Distro
    Xubuntu 17.04 Zesty Zapus

    Re: problems with no space left on device

    Fixed that.

    I agree it's a bad idea in general to rm files from installed packages, but I experienced that this is the typical case where the package manager can get into a deadlock: it refuses to uninstall anything until the dependencies have been fixed, which cannot be fixed until some disk space has been freed, for which old packaged have to be removed.

    Now that I think again about it, pdkg --purge may be willing to remove the packages without insisting on fixing the dependencies first. Modifying my previous post again.

  7. #17
    Join Date
    May 2006
    Location
    Boston
    Beans
    1,918
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: problems with no space left on device

    after removing the old kernels run
    Code:
    sudo update-grub2
    so that your grub won't have the old list

    blog
    Donations BTC : 12FwoB7uAM5FnweykpR1AEEDVFaTLTYFkS
    DOUBLEPLUSGOOD!!

  8. #18
    Join Date
    Mar 2010
    Location
    Squidbilly-land
    Beans
    11,372
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: problems with no space left on device

    The way that I've dealt with this was to MOVE the files temporarily to a different file system, clean up other packages, then move them back a little at a time and purge the files using the package manager. Once that wasn't an option, so added a new /var/www partition and moved all the files down there (damn ruby-on-rails app with thousands and thousands of tiny files), freeing up / inodes.

    Just took a power hit. Sunny and 72 deg outside today. Thanks to a few UPSes - nothing bad happened. No power issues at all during recent ice/snow storms, but on a fantastic day like to day - BAM. Out for 10 seconds? Odd.

    Here's that system today:
    Code:
    $ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/vda1       7.1G  3.0G  3.7G  45% /
    /dev/vda2       2.3G  801M  1.4G  38% /var/www
    
    $ df -ih
    Filesystem     Inodes IUsed IFree IUse% Mounted on
    /dev/vda1        454K  287K  167K   64% /
    /dev/vda2        151K   56K   95K   38% /var/www
    This is a virtual machine, so adding another virtual-HDD isn't THAT hard. I'd try using a USB-flash drive for the /usr/src stuff. Might be a little more advanced than an average Ubuntu user could handle? I don't know.

  9. #19
    Join Date
    Dec 2010
    Beans
    26

    Re: problems with no space left on device

    Thanks that fixed my problem!

Page 2 of 2 FirstFirst 12

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
  •