6

I have a list of packages and I want to know which packages are not available in the ubuntu repositories.

I type this command but it returns nothing :

$ apt-cache show vim TotO perl 2>&1 | grep "Unable to locate package"
$

It occurs in both Ubuntu 16.04 LTS and 18.04 LTS.

Can you help ?

wjandrea
  • 14,236
  • 4
  • 48
  • 98
SebMa
  • 2,291

1 Answers1

6

As per apt-cache man-page

-q, --quiet
Quiet; produces output suitable for logging, omitting progress indicators. More q's will produce more quietness up to a maximum of 2. You can also use -q=# to set the quietness level, overriding the configuration file. Configuration Item: quiet.

you have to pass --quiet=0 to use apt-cache in scripts.

Use code below:

apt-cache --quiet=0 show vim TotO perl 2>&1 | grep "Unable to locate package"

or

apt-cache -q0 show vim TotO perl 2>&1 | grep "Unable to locate package"
N0rbert
  • 99,918