How to list packages by size using Aptitude

Biggest packages installed on my Ubuntu according to Aptitude
Biggest packages installed on my Ubuntu according to Aptitude

This is a query that I frequently have: how to list packages sorted by their size? I am especially interested in this about installed packages. There are other tools that can do this job, but I like to use Aptitude for this since I use it regularly anyway.

To list all available packages:

$ aptitude search ".*"

Aptitude understands the concept of the install size i.e., how much disk space the files of a package occupy after they are uncompressed and extracted from the package. So, sorting by this installsize is easy:

$ aptitude search ".*" --sort installsize

Note that this listing is in ascending order of size. So, the largest packages are listed at the end.

The problem with this listing is that Aptitude does not display the size, so we have no idea how big the install sizes are. To show that, we can tinker with the display format and get it to display the package name and install size:

$ aptitude search ".*" --display-format "%p %I" --sort installsize

Using the shorter versions of the options, this command becomes:

$ aptitude search ".*" -F "%p %I" -O installsize

Now, to list all installed packages:

$ aptitude search "~i"

Finally, to show the install size of only installed packages and sort by it, we just apply the options shown above:

$ aptitude search "~i" --display-format "%p %I" --sort installsize

Reference: Aptitude user’s manual (its man page is woefully short on details of its commands)

Tried with: Aptitude 0.6.8.2 and Ubuntu 14.04

How to change type size used for footnotes in LaTeX

Footnotes in a LaTeX document are rendered in the predefined footnotesize type size. This size lies between the scriptsize and small of the 9 type sizes in LaTeX. The size of footnotes in a LaTeX document can be changed by setting it one of the other 8 type sizes of LaTeX.

For example, to reduce the footnote type size by one increment:

\renewcommand{\footnotesize}{\scriptsize}