Package: Apt
version: 2.0.6 (amd64)
system: Ubuntu cloud image: ubuntu-20.04-server-cloudimg-amd64-disk-kvm.img & Ubuntu in general
I've
had errors over the years of using apt. Almost every time it's related
to limited installation space. I appreciate all of the utilities of apt,
such as the necessary download size and storage required. As well as
the --fix-broken utility that repairs many problems. However, not all,
such as the one below. The install process froze as the space ran out.
"E: Sub-process /usr/bin/dpkg returned an error code (1)"
This
is a difficult error to resolve. Partially because dpkg isnt conveying
the error information. To resolve it last time I had to erase some of
the config files for dpkg, but that's not working this time. Last time I
had removed some of the larger deb files to make space to at least
install a small package ncdu to find space hogs. This time with `apt upgrade` it stopped when updating the kernel.
There
are a couple of things that would in my view really help many, many
Linux users. The first would be to send a warning when the installation
will exceed the storage space. This should be trivial to implement.
Then,
possibly more importantly, but I don't know the installation procedures
and whether there is something preventing it, but is there a way to
allow the removal of a package when there is an existing broken install?
That would really help. If I could remove LibreOffice or something to
make enough space to fix the broken install, that would go a very long
way.
In fact, one more step back could be
very, very useful if possible. How about allowing the removal of the
package that was broken because of not enough space? I don't see why
this couldn't be done.
All of this really
underscores having a warning if there is not enough disk space. It has
caused problems almost every time I can think of. I cant think of a time
when it didnt. This is because of the other issues above, it
effectively blocks an operation of apt at all. (And I do overestimate my
free disk space occasionally, especially when setting up these small
base images trying to conserve space because there will be many copies
of the VM file).
It's really frustrating because with one easy to make error, there is no way to undo it, and I have to find something to delete (not possible on this small image) or go through the process of resizing, which isnt something I wanted to do because shrinking can be problematic, and I was actually just trying to get grub to work on this cloud image by trying to see if upgrade was somehow related, which I dont think it is, but I thought was worth trying.
I cant even install the reportbug package.
I
really think these couple of improvements will really help the average
Linux user and take so much of the headache and hassle out of what is
very nearly the best OS today.
Thank you.