1

I have installed a bunch of development packages from the Ubuntu repositories today, and some of them seem to have had massive amounts of dependencies.

Out of curiosity — and to notify those who read that other question — I would like to know the exact storage space size that I have used up for these development packages today.

I don't know exactly where they got written on the disk, but certainly not in my home directory.

Is there a way to find out the disk footprint of these packages?


Update:

The post I'm trying to link here got closed as duplicate (I hope only temporarily, as I have requested reopening), so in the meanwhile, here is a little info about it: the project was about setting up everything to compile gnome-shell from source, and the complete list of packages that I installed manually is:

meson
gcc
cmake
libecal2.0-dev
libgcr-3-dev
libgirepository1.0-dev
libgjs-dev
libmutter-6-dev
libpolkit-agent-1-dev
libstartup-notification0-dev
libgnome-desktop-3-dev
libgnome-bluetooth-dev
libnm-dev
xsltproc
sassc
libpulse-dev
asciidoc-base

As I said, some of these had massive dependencies.

I was originally thinking about a solution that would have allowed to inspect the created / last-modified date (whichever is available) of files in specific directories.

But seeing the vast volume of files involved I tend to think that a precise answer might not worth the amortization that finding it out would put my machnie through...

Anyways, to take a different, approximate result, I will simply look at the change of the cumulative used space of my disk today: I have my / and /home together on the same, 40GB partition.

Before I started with this project I remember I had around 34% of the disk used. Now 45% of the 40GB is used. That seems to put the number around 4GB, which was staggering enough to inspire this question.

1 Answer 1

1

Perhaps something like this would be a good start:

apt show libecal2.0-dev libgcr-3-dev libgirepository1.0-dev libgjs-dev | grep Installed-Size

To get the list of files installed by a package:

dpkg -L libecal2.0-dev

Edit: To include sizes of dependencies, at least first-level:

apt show $(apt show libecal2.0-dev | grep Depends | sed -e 's/.*Depends://;s/\(([^,]*)\),\?//g') | grep -E '(^Package|Installed-Size)'

This could be iterated over to consider n levels of dependency, but I suppose that may be more useful with prior knowledge of already installed packages on your system before you installed that set of dev packages, in order to avoid counting those already present packages as part of the dev packages' footprint.

4
  • But does that calculate the weight of their dependencies? These top-level packages were more or less lightweight, as far as I can tell. But their dependencies, those were the heavy stuff...
    – Levente
    Feb 24, 2021 at 22:37
  • Edited my answer to consider dependencies (first level).
    – Tan
    Feb 24, 2021 at 23:07
  • In the meanwhile I was guided to this post: askubuntu.com/a/21394/1157519 I quote from it: "This will generate a massive list. apt-rdepends -b xterm, for example, generates 8773 lines of output, and takes it's time doing it." That's more like the true number of the packages actually. And it's only a list of packages. I expect gnome-shell also has some horrible amount. At this point I'm afraid if I execute these commands, it will send my computer on its knees... I still ponder how to proceed.
    – Levente
    Feb 24, 2021 at 23:23
  • apt show $(apt show asciidoc-base | grep Depends | sed -e 's/.*Depends://;s/\(([^,]*)\),\?//g') | grep -E '(^Package|Installed-Size)' — this shows only 894kB of cumulative size, but in real life I have watched hundreds of megabytes being downloaded while asciidoc-base installed (in Synaptic's graphical interface).
    – Levente
    Feb 25, 2021 at 0:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .