I installed a few packages with APT using apt-get
. I used the --no-install-recommends
switch with it to save some disk space.
Now I need to know: how do I install the recommended packages for the already installed programs?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityYou can run apt-cache show package_you_care_about | grep Recommends
.
This will show you all the recommended packages for that particular package. You can then install all the packages there.
For example, with gedit:
apt-cache show gedit | grep Recommends
output: Recommends: gir1.2-gtksource-3.0, zenity, yelp
sudo apt-get install gir1.2-gtksource-3.0 zenity yelp
To find all packages with missing recommended packages:
aptitude search '~RBrecommends:~i'
Get a list of installed packages with missing recommended package:
aptitude search '?installed?broken-recommends'
Get a list of not installed, missing packages that are recommended by installed packages - "missing recommends":
aptitude search '?broken-reverse-recommends(?installed)'
Get which package is recommending a specific "missing recommend":
aptitude search '?installed?broken-recommends(MISSING_PKG_NAME)'
One liner: For all "missing recommends", get by which packages are recommended:
for p in $(aptitude search -F%p '?broken-reverse-recommends(?installed)'); do echo $p; aptitude search "?installed?broken-recommends($p)"; done
You can find "missing recommends" in Synaptic package manager. (As I see, Synaptic shows also the missing Suggested packages.)
You can install all "missing recommends" with one command but I do not recommend it! First, review the list of packages before install. (For example, fresh install of debian buster shows missing "default-mta", which is a virtual package.)
apt install $(aptitude search -F%p '?broken-reverse-recommends(?installed)')
(This is summary from few similar questions. Hope it will help someone else.)
aptitude
in a terminal, and then press Ctrl+t or use the mouse to go to the menu bar.apt-get remove <package>
thenapt-get install <package>