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

Thread: getting You don't have enough free space in /var/cache/apt/archives/.

  1. #11
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,690
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: getting You don't have enough free space in /var/cache/apt/archives/.

    Code:
    ii  linux-image-4.4.0-87-generic
    pi  linux-image-4.4.0-89-generic
    iF  linux-image-4.4.0-91-generic
    iF  linux-image-4.4.0-92-generic
    This right here would have freaked me out looking at it.

    "ii" means it is installed...making me think the last good kernel installed is 4.4.0-87

    "pi" means it wants to be purged but is currently installed so 4.4.0-89 is subject to being removed with an "apt-get autoremove" command.

    "iF" means these are installed but failed during install and since these are the 2 newest kernels, I would suspect you were out of room when 4.4.0-91 tried to install and 4.4.0-92 failed as well.

    I would use 4.4.0-87 as the current kernel to boot and purge all others.

    You will need to clean up the root partition too since it was unfortunate that everything else is in the same partition (thus if /var or /opt fill up, it affects the entire OS....you should NEVER let root fill up)

    Once room has been made on /boot and the other partition (and only then), you can then do an "apt-get upgrade" to install the latest kernel...although you will likely need to do "apt-get install -f" to fix the packages that could not finish installing.

    Also, the "uname -a" command gives you the kernel that is loaded which you can match to the files in /boot.

    To fix where you are at right now may require help from others more experienced in this kind of situation. A Live CD may help you with clearing out files so you can repair the boot partition.

    I avoid these situations by manually setting up the partition during the initial install of the OS. See my sig for a link to a tutorial on installing Ubuntu Server...it has a detailed section that talks about how to carve up the partitions to prevent this and help manage growth no matter where it is at on the server.

    Speaking of growth, you said you didn't know what was taking up space. The small /boot partition is obvious, old kernels were never purged and just kept consuming space. That happens on every system. Solution is to purge old kernels at least every couple months depending on our large your /boot partition was initially configured. As for the rest of the space, you can find out what is taking up the most space by using the following command in the various directories:

    Code:
    du -sh /usr /opt /home /tmp /var /srv
    Example output:
    Code:
    880M    /usr
    4.0K    /opt
    44K     /home
    32K     /tmp
    950M    /var
    4.0K    /srv
    Let's say you didn't expect /var to be that big, you then run this command:

    Code:
    du -sh /var/*
    Example output:
    Code:
    8.4M    /var/backups
    415M    /var/cache
    4.0K    /var/crash
    357M    /var/lib
    4.0K    /var/local
    0       /var/lock
    22M     /var/log
    4.0K    /var/mail
    4.0K    /var/opt
    0       /var/run
    16K     /var/scripts
    32K     /var/spool
    12K     /var/tmp
    150M    /var/www
    We now see that the largest directory under /var is cache @ 415 MB, then lib @ 357 MB and www @ 150 MB

    I hope this helps prevents future mishaps.

    LHammonds

  2. #12
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: getting You don't have enough free space in /var/cache/apt/archives/.

    Hold on, if you are using systemrescuecd to boot, that changes things a lot. The commands you issue give results from the live rescuecd session, not from your installation.

    You need to chroot into your installation so that you work from inside it... And also don't forget to mount your /boot partition which I don't see on that rescuecd screenshot.

    So first list all disks to make sure which is your partition. One command you should be able to use is:
    Code:
    lsblk
    That should list all disks and partitions. After we know that we can plan the chroot.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  3. #13
    Join Date
    Nov 2007
    Location
    Coldwater, OH
    Beans
    551
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: getting You don't have enough free space in /var/cache/apt/archives/.

    I dont know really how to mount the system in vps but here is the command you wanted:

    ub2.jpg

    but in main system as /dev/mapper/mail--vg-root its still showing full disk.
    Tim's Computer Repair
    trpcrepair.com

  4. #14
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,560
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: getting You don't have enough free space in /var/cache/apt/archives/.

    OK. So, /dev/vda1 is your /boot. And you also have LVM on the server, that you need to activate (although I think rescuecd does that for you).

    To make sure the LVM is activated, and unmount any default mount point, try the following:
    Code:
    vgchange -ay
    umount /dev/mail-vg/root   (I believe that is your LV name, if not adjust it accordingly)
    After that is done, you are ready to temporarily mount everything and chroot:
    Code:
    mount /dev/mail-vg/root /mnt
    mount /dev/vda1 /mnt/boot
    mount --bind /proc /mnt/proc
    mount --bind /dev /mnt/dev
    mount --bind /sys /mnt/sys
    chroot /mnt
    After that you should be inside your OS chroot. Stop at this point and show the output of:
    Code:
    ls /boot
    Do not do anything else, leave the terminal session open...
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

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
  •