Announcement

Collapse
No announcement yet.

Root / is full

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Root / is full

    For years I always gave / 20 GB of space, and it always has worked out well, and never got more than half full. Then I started having problems where programs were complaining that /tmp was full, so I rebooted and got "xsession warning unable to write to /tmp". Luckily I had a backup of my / and that is how I solved it. But I still only had 300 MB of space. So I deleted all the Apt files, and cleared out the /tmp folder. Now I have 2 GB of space left.

    How come Kubuntu is not keeping / cleaned up?

    Thanks
    Linux since 2008, Kubuntu 20.10
    *ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
    *AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
    *G.SKILL Ripjaws X Series 16GB DDR3 SDRAM -- Asus GEFORCE GTX 1050 TI 4 GB

    #2
    I'm assuming you have separate root and home partitions. If you combine them onto one this problem will go away. My root is currently at 16.9 GB I'm not aware of any distro that does the maintenance for you, but I could be missing something.

    Comment


      #3
      If there is a space problem in /, then combining / and /home will not solve the problem. Doing that will eventually allow both to overflow.

      My / directory is on its own partition that is sized at 28 GB, with about 9.1 GB in files. This goes up and down, based on activity, installing apps, installing updates, and the like. In general, / fills up very slowly.

      One of the best things you can do is to periodically run:
      Code:
      sudo apt autoremove
      Code:
      sudo apt autoclean
      Code:
      sudo apt clean
      I do this after every update/upgrade, and it removes temporary files no longer needed. These quite often remove a couple hundred MB of junk.

      I just now did it, and about 100 MB was cleared out.
      Code:
      df -h
      Filesystem      Size  Used Avail Use% Mounted on
      udev            5.7G     0  5.7G   0% /dev
      tmpfs           1.2G  2.1M  1.2G   1% /run
      /dev/nvme0n1p2   28G  9.1G   17G  35% /
      tmpfs           5.8G  940K  5.8G   1% /dev/shm
      tmpfs           5.0M  4.0K  5.0M   1% /run/lock
      tmpfs           5.8G     0  5.8G   0% /sys/fs/cgroup
      /dev/nvme0n1p1   93M  7.9M   85M   9% /boot/efi
      /dev/nvme0n1p3  426G  274G  131G  68% /home
      tmpfs           1.2G   16K  1.2G   1% /run/user/1000
      [john@john-HP-ENVY-x360 ~]$ sudo apt autoremove
      [sudo] password for john: 
      Reading package lists... Done
      Building dependency tree       
      Reading state information... Done
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      [john@john-HP-ENVY-x360 ~]$ sudo apt autoclean
      Reading package lists... Done
      Building dependency tree       
      Reading state information... Done
      [john@john-HP-ENVY-x360 ~]$ sudo apt clean
      [john@john-HP-ENVY-x360 ~]$ df -h
      Filesystem      Size  Used Avail Use% Mounted on
      udev            5.7G     0  5.7G   0% /dev
      tmpfs           1.2G  2.1M  1.2G   1% /run
      /dev/nvme0n1p2   28G  9.0G   17G  35% /
      tmpfs           5.8G  940K  5.8G   1% /dev/shm
      tmpfs           5.0M  4.0K  5.0M   1% /run/lock
      tmpfs           5.8G     0  5.8G   0% /sys/fs/cgroup
      /dev/nvme0n1p1   93M  7.9M   85M   9% /boot/efi
      /dev/nvme0n1p3  426G  274G  131G  68% /home
      tmpfs           1.2G   16K  1.2G   1% /run/user/1000
      The next brick house on the left
      Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



      Comment


        #4
        I suggest having a look in /var/log. I've found GB of old logs in there sometimes.

        I have to run sudo journalctl --vacuum-size=100M periodically (on an Ubuntu instance I have on Linode, partly because it is internet-facing and gets a huge amount of connection attempts sometimes, even with fail2ban).

        I would check /boot to make sure there's two kernels (vimlinuz*, initrd.img*, and System.map*). Sometimes I've had kernels get left behind by a release upgrade. The space taken up by such a kernel is mostly not in /boot but /usr; if you have got an old kernel that shouldn't be there use apt (or your favourite apt tool, mine's muon) to remove it.
        Regards, John Little

        Comment


          #5
          Originally posted by Fred47 View Post
          I'm assuming you have separate root and home partitions. If you combine them onto one this problem will go away.
          Or, use a btrfs. With the root and home subvolumes in the same btrfs, the normal approach, the free space is pooled between them, and other subvolumes, if any.
          Regards, John Little

          Comment


            #6
            Yes I do have / and /home on separate partitions.
            I will try all of your suggestions.
            Thank You
            Linux since 2008, Kubuntu 20.10
            *ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
            *AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
            *G.SKILL Ripjaws X Series 16GB DDR3 SDRAM -- Asus GEFORCE GTX 1050 TI 4 GB

            Comment


              #7
              Originally posted by jlittle View Post

              I would check /boot to make sure there's two kernels (vimlinuz*, initrd.img*, and System.map*). Sometimes I've had kernels get left behind by a release upgrade. The space taken up by such a kernel is mostly not in /boot but /usr; if you have got an old kernel that shouldn't be there use apt (or your favourite apt tool, mine's muon) to remove it.
              I have 3 of each vimlinuz*, initrd.img*, and System.map*. I knew how to remove excess kernels in Mint, but not sure how to do it in Kubuntu?
              By running the suggested commands, I now have 2.6 GB of free space.
              Linux since 2008, Kubuntu 20.10
              *ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
              *AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
              *G.SKILL Ripjaws X Series 16GB DDR3 SDRAM -- Asus GEFORCE GTX 1050 TI 4 GB

              Comment


                #8
                Typically, you should get notices of available updates. Some of those updates will be kernel updates.

                There are ways to process kernel updates, but what I do is when Discover pops a notice of available changes, I go to a konsole and enter:
                Code:
                sudo apt update
                Code:
                sudo apt full-upgrade
                If a kernel update occurred, after the next boot I'll run:
                Code:
                sudo apt autoremove
                Code:
                sudo apt autoclean
                Code:
                sudo apt clean
                After that cycle I'm left with two kernels. If you manually install kernels for your own purposes, you will have to manually remove any old ones that you no longer need.
                The next brick house on the left
                Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                Comment


                  #9
                  Thanks Jglen

                  I notice Mozilla Firefox likes to put a lot on files in /tmp. Anyway to make it write to /home instead?
                  Linux since 2008, Kubuntu 20.10
                  *ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
                  *AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
                  *G.SKILL Ripjaws X Series 16GB DDR3 SDRAM -- Asus GEFORCE GTX 1050 TI 4 GB

                  Comment


                    #10
                    You might be surprised at what takes up space, depending on what software you have installed, and even what types of packages you might have.

                    When I get stumped on this topic, I usually pull out Filelight and visually look at what is using space.
                    I was using flatpak to use VLC as the stock one was giving me fits, so I was testing specifically using a sandboxed format. I think that thie porogram, plus all its repo caches and dependencies were taking 3.1gb. Just for VLC, I tested and checked. Granted, the dependency sub-packages are shared with other applications if one installs a fair number of them, so it may not be a a true 'bloat' situation, particularly if those are Gtk/Gnome apps. VLC on a KDE Plasma system installed this is way is pure Bloaty McBloatface

                    Note that uninstalling one of these containerized applications does NOT necessarily uninstall any of its dependency sub-packages, though VLC via flatpak did remove all its extras. Not all seem to.

                    Comment


                      #11
                      Thanks, I will give Filelight a try. I have a lot of /var logs, do I need them?
                      Linux since 2008, Kubuntu 20.10
                      *ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
                      *AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
                      *G.SKILL Ripjaws X Series 16GB DDR3 SDRAM -- Asus GEFORCE GTX 1050 TI 4 GB

                      Comment


                        #12
                        I use FF. So I looked in /tmp and /var/tmp. In few smallish files in both, and almost all were written during boot and login. The only place FF writes is to cache in /home, as far as I can tell.

                        So maybe the next question is, where did your FF come from?
                        Last edited by jglen490; Jul 12, 2021, 05:02 PM.
                        The next brick house on the left
                        Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                        Comment


                          #13
                          I use the FF that came with Kubuntu, or the package manager.
                          Linux since 2008, Kubuntu 20.10
                          *ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
                          *AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
                          *G.SKILL Ripjaws X Series 16GB DDR3 SDRAM -- Asus GEFORCE GTX 1050 TI 4 GB

                          Comment


                            #14
                            I deleted a bunch of /var logs, now I have 6.2 GB free. All is well now.
                            Linux since 2008, Kubuntu 20.10
                            *ASUS 970 PRO GAMING/AURA AM3+ AMD 970 + SB 950 SATA 6Gb/s USB 3.1
                            *AMD FX-8370 with AMD Wraith cooler Vishera 8-Core 4.0 GHz (4.3 GHz Turbo)
                            *G.SKILL Ripjaws X Series 16GB DDR3 SDRAM -- Asus GEFORCE GTX 1050 TI 4 GB

                            Comment

                            Working...
                            X