Per binarysta's comment, dpkg-query
works well for installed packages. If you are considering size before installing a package, you can use apt
or apt-cache
.
apt show
. or apt-cache show
gives an Installed-Size:
field
stew ~ $ apt show texlive
Package: texlive
Version: 2020.20200417-1
Priority: optional
Section: tex
Source: texlive-base
Maintainer: Debian TeX Maintainers <debian-tex-maint@lists.debian.org>
Installed-Size: 72.7 kB
Depends: texlive-fonts-recommended (>= 2020.20200417), texlive-latex-base (>= 2020.20200417), texlive-latex-recommended (>= 2020.20200417)
Homepage: http://www.tug.org/texlive/
Tag: made-of::tex, role::app-data, role::program, use::typesetting,
works-with-format::tex, works-with::text
Download-Size: 33.4 kB
APT-Manual-Installed: no
APT-Sources: http://ftp.debian.org/debian testing/main amd64 Packages
Description: TeX Live: A decent selection of the TeX Live packages
The TeX Live software distribution offers a complete TeX system. It
encompasses programs for typesetting, previewing and printing of TeX
documents in many different languages, and a large collection of TeX macros
and font libraries. . This metapackage provides a decent selection of the
TeX Live packages which should suffice for the most common tasks. . The
distribution also includes extensive general documentation about TeX, as
well as the documentation accompanying the included software packages.
You could:
$ apt-cache show texlive | grep Installed-Size
Installed-Size: 72.7 kB
or for texlive*
:
$ apt-cache show texlive* | grep -E 'Package:|Installed-Size:'
Package: texlive-fonts-recommended
Installed-Size: 15029
Package: texlive-lang-portuguese
Installed-Size: 16440
Package: texlive-latex-recommended
Installed-Size: 31735
Package: texlive-base
Installed-Size: 74760
...
from man apt(8)
:
SYNOPSIS
apt ... {list | search | show | ...}...
...
show (apt-cache(8))
Show information about the given package(s) including its dependencies, installation and
download size, sources the package is available from, the description of the packages
content and much more. It can e.g. be helpful to look at this information before allowing
apt(8) to remove a package or while searching for new packages to install.
...
dpkg-query -Wf '${Installed-Size}\t${Package}\n' texlive-full
(or whichevertexlive
package it is),aptitude search --display-format '%p %I' texlive
, orapt-cache show texlive-full | grep Installed-Size
, ... – muru May 22 '20 at 17:43