Subject: Using APK to get the size of package before install?

From: "Dr. Lonnie Cumberland, PhD" <[email-masked]>
Date: Tue, 20 Feb 2024 15:30:14 -0500

Hello All,

I am wondering about the size of Xorg when installed on Alpine and would 
like to know if it is possible to get the size, including dependencies, 
without installing it?

Am going to be playing with using an Xserver with a remote Linux 
Application and wanted to see how much space is needed before hand since 
I am mostly running in RAM for these trials.

Any information would be greatly appreciated.
Thanks in advance,
Lonnie

---

From: Patrycja Rosa <[email-masked]>
Date: Tue, 20 Feb 2024 21:34:33 +0100

> like to know if it is possible to get the size, including dependencies, 
hiya, you can just do `apk add -i somepackage`, that'll give you a brief 
summary, including the disk space used after the transaction:
$ doas apk add -i gnome
The following packages will be REMOVED:
	networkmanager polkit polkit-noelogind-libs
The following NEW packages will be installed:
	<snip>
After this operation, 219 MiB of additional disk space will be used.
Do you want to continue [Y/n]?

---

From: Jeff Pohlmeyer <[email-masked]>
Date: Tue, 20 Feb 2024 15:47:15 -0600

On Tue, Feb 20, 2024 at 2:30 PM Dr. Lonnie Cumberland, PhD
<[email-masked]> wrote:
> I am wondering about the size of Xorg when installed on Alpine and would like to know if it is possible to get the size, including dependencies, without installing it?

If you use the -i option with "apk add" it will give you the download
size and disk space required and ask if you want to proceed. Then you
can just press "N" or Ctrl+C. If you wanted to automate that, you
might try something like:
echo n | apk add -i xorg-server
(or whatever the package name is)

 -- Jeff

---

From: "Dr. Lonnie Cumberland, PhD" <[email-masked]>
Date: Tue, 20 Feb 2024 17:52:57 -0500

Thanks so very much for the information on this, Jeff.

You know, I am actually finding Alpine Linux to be a real remarkable OS 
the more that I research and use it. I especially like the minimized 
distro approach which seems to fit perfectly with my current project.

Best,
Lonnie