Apt
獲取某些包使用了多少空間
我想知道我的 LaTeX 安裝使用了多少空間。我試著做,
apt
但我不確定這是否可能。我想做的是有一個類似的命令apt-cache list --show-install-size texlive*
輸出
128 MB
當然
show-install-size
不存在。
Per binarysta 的評論,
dpkg-query
適用於已安裝的軟體包。如果您在安裝軟體包之前考慮大小,您可以使用apt
或apt-cache
.
apt show
. 或apt-cache show
給出一個Installed-Size:
欄位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.
你可以:
$ apt-cache show texlive | grep Installed-Size Installed-Size: 72.7 kB
或為
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 ...
來自
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. ...