Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Not enough free space in /var/cache/apt/archives

    Support
    6
    14
    3585
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gb
      gb last edited by

      Hi,

      I just got my M10 installed with Xenial release candidate 4 version.
      I wipe it so it is empty.

      I want to try to install some packages via apt-get install, so I make it writable following these steps.

      But when I try to install I get the following error.

      phablet@ubuntu-phablet:~$ sudo apt-get install sl
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      The following NEW packages will be installed:
      sl
      0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
      Need to get 23.5 kB of archives.
      After this operation, 71.7 kB of additional disk space will be used.
      E: You don't have enough free space in /var/cache/apt/archives/.

      I looked how partitions were being used (df -h)

      /dev/disk/by-partlabel/userdata 9.2G 3.0G 6.2G 33% /userdata
      /dev/loop0 2.0G 1.9G 0 100% /

      So the problem seems to be / partition is full since the very beginning.

      Other people are facing similar issues, but it seems we haven´t find the solution yet.

      Any suggestions?

      advocatux 1 Reply Last reply Reply Quote 0
      • advocatux
        advocatux @gb last edited by

        @gb making the system rw is not really a good idea for many reasons. If you want to use apt it's better to do it inside a contained environment, like Libertine for example.

        https://docs.ubports.com/en/latest/userguide/dailyuse/libertine.html

        1 Reply Last reply Reply Quote 2
        • gb
          gb last edited by

          Thanks for the tip @advocatux
          I followed the instructions and I have a container working and I could install packages.

          1 Reply Last reply Reply Quote 1
          • Akito
            Akito last edited by

            Any solution to this? I don't want to use this workaround because I want to use the system as natively as possible. Ideally, I would prefer to not have unnecessary /dev/loop partitions in the first place.

            1 Reply Last reply Reply Quote 0
            • pparent
              pparent last edited by

              sudo rm -r /var/cache/apt
              sudo tune2fs -m 0 /dev/loop0
              
              dobey 1 Reply Last reply Reply Quote 0
              • dobey
                dobey @pparent last edited by

                @pparent This is not a good idea to do.

                However, if one really needs to install debs in rootfs for some reason, such as using ubports-qa to test changes to system components from PRs, one can bind mount a directory in user writable partition on top of /var/cache/apt/archives

                mkdir -p ~/aptcache
                sudo mount --bind /home/phablet/aptcache /var/cache/apt
                

                However, there will still be plenty of other issues if one wants to try to install from apt in rootfs, which is not supported, and it is strongly advised against doing so.

                D 1 Reply Last reply Reply Quote 0
                • pparent
                  pparent last edited by

                  @pparent This is not a good idea to do.

                  No disrespect, but I think this is why I will choose pureOS in the long run, whenever I receive the phone and it is usable.

                  As users I want to be able to do the same things we can do on our computer, and be in control of our device, without being artificially limited, and not being sandboxed into a container. Otherwise I would use Android!

                  dobey 1 Reply Last reply Reply Quote 1
                  • dobey
                    dobey @pparent last edited by

                    @pparent I think you will be somewhat disappointed by that too, because no matter what, the phone is still not a PC.

                    There is a huge difference between Android and UT. The way UT works is because it has to run on top of Android kernels, and because it is meant to provide a more secure alternative to Android, that does provide the ability to run legacy linux apps in a container too.

                    There are a whole lot of things about traditional PC Linux distros that just do not make sense to keep doing in the modern world, regardless of device. And pureOS isn't going to change that on their phone.

                    pparent 1 Reply Last reply Reply Quote 3
                    • pparent
                      pparent @dobey last edited by pparent

                      @dobey

                      Actually I got the above problem trying to install a console program (dig) to do some in-field testing. To me all console programs make perfect sense being run on phones as they are on desktop, server, router, super-calculator, robot ... . And they can be used to really control the system.

                      On the other hand, on the graphical side, lately purism seems to make a great job adapting gnome apps for phone, so I guess we just have to wait and see.

                      dobey 1 Reply Last reply Reply Quote 0
                      • dobey
                        dobey @pparent last edited by

                        @pparent said in Not enough free space in /var/cache/apt/archives:

                        Actually I got the above problem trying to install a console program (dig) to do some in-field testing. To me all console programs make perfect sense being run on phones as they are on desktop, server, router, super-calculator, robot ... . And they can be used to really control the system.

                        There is nothing preventing you from using CLI tools. Installing apps with legacy insecure packaging, is done in libertine. You can install and run whatever CLI apps you want, in there too.

                        But it doesn't change the facts.

                        pparent 1 Reply Last reply Reply Quote 0
                        • pparent
                          pparent @dobey last edited by pparent

                          @advocatux said in Not enough free space in /var/cache/apt/archives:

                          @gb making the system rw is not really a good idea for many reasons. If you want to use apt it's better to do it inside a contained environment, like Libertine for example.

                          Yes but I want to be able to use CLI tools on the real system to control the real system, control the machine, not be sandboxed in a container.

                          Can you explain what is insecure about "legacy packaging" (i.e apt ), and why it would be more insecure on the phone than it is on a laptop or a server?

                          advocatux dobey 2 Replies Last reply Reply Quote 0
                          • advocatux
                            advocatux @pparent last edited by advocatux

                            I want to be able to use CLI tools on the real system to control the real system, control the machine, not be sandboxed in a container.

                            @pparent there's an official & supported way of doing things but of course you can do whatever you want with your device, you have complete freedom. Just don't expect any help when things go south 😉

                            You can make the root filesystem rw, you can resize partitions, you can use any repo or ppa that you want (as long as the packages are compiled for armhf), etc but you're at your own risk with that.

                            1 Reply Last reply Reply Quote 0
                            • dobey
                              dobey @pparent last edited by

                              @pparent said in Not enough free space in /var/cache/apt/archives:

                              Can you explain what is insecure about "legacy packaging" (i.e apt ), and why it would be more insecure on the phone than it is on a laptop or a server?

                              It is not truly secure on a laptop or server either. It has nothing to do with the device. With dpkg you are giving anyone who creates a package root access to your system, when you install that package.

                              As I've said many times before, phones are not PCs, and UT is not a traditional PC Linux distro. As @advocatux you are of course welcome to do whatever you want to your own device, with UT on it (it's yours, and UT is open source), but UT is not designed or built in this manner, and any changes you make are your own responsibility, and if installing updates break that (they will at some point), you will have deal with it yourself. If what you want is a traditional Linux distro on hardware that looks like a phone, there are other distributions working more towards that goal, such as postmarket OS. However, we are attempting to build a system usable for phones here, which is secure.

                              1 Reply Last reply Reply Quote 4
                              • D
                                dj @dobey last edited by

                                @dobey : This solution really helped for me to fix this issue

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post