Use: apt -s install ...
Passing the -s
option to apt
causes it to simulate installation but not actually install or modify anything. That shows what you can expect to see from apt
when you install the package, including which packages if any are pulled in to satisfy its (direct and indirect) dependencies.
For example, to find out what will happen when you install the apache2
package, you would run:
apt -s install apache2
That shows you what steps would be taken by sudo apt install apache2
.
The -s
option can also be spelled as any of --simulate
, --just-print
, --dry-run
, --recon
, --no-act
. So if you see (or write) any of those, they're doing the same thing.
The -s
option is documented in man apt-get
and not in man apt
(the latter of which doesn't document most features and options), but both apt-get -s install ...
and apt -s install ...
are supported.
You can likewise simulate other actions with -s
, such as the remove
action.
Unlike with apt
commands that actually make changes to your system, running apt -s
as root is optional, so you can omit sudo
.
Best Answer
Using
aptitude
a high-level interface to the package manager, but you have to install it firstAfter that
to see a list of automatically installed packages.
And to see at the same time which programs they were installed by:
Only
Depends
Or the full list
Sample output