75

From the man page:

-m, --ignore-missing, --fix-missing
  Ignore missing packages; if packages cannot be retrieved or fail the integrity 
  check after retrieval (corrupted package files), hold back those packages and 
  handle the result. 

  Use of this option together with -f may produce an error in some situations. If a 
  package is selected for installation (particularly if it is mentioned on the 
  command line) and it could not be downloaded then it will be silently held back. 

 Configuration Item: APT::Get::Fix-Missing.

This is confusing:

  1. How can 'ignore missing' and 'fix missing' be synonyms for the same option?
  2. What does 'hold back' mean in this context?
  3. What does 'handle the result' mean?

And in what situation is it useful anyway? When you try to install a package not in the apt index, you get this message:

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Are the two suggestions (apt-get update, apt-get install --fix-missing...) at all equivalent?

  • 1
    Yep, it's weird. I always thought that --fix-missing is the synonym of -f. However, the behavior should be the same as Synaptic's: try to update only packages downloaded. – Danatela May 08 '14 at 04:58

1 Answers1

54

Ok, in order:

  • (1) -m ignore missing or fix missing packages (as opposed to -f broken packages). These options are synonyms for the same option. (Since to fix it ignores from here it takes its own weirdness :-) )
  • (2-3) When you install/upgrade with apt-get upgrade or with apt-get install somepackage, usually apt tries to update dependencies. This means that it may find that some packages need new or updated versions of existing packages, and so on in a cascade of dependencies. If some of those packages are missing or fail the integrity check, it seems to suspend this package, and wants you to go to handle the result following the handle method of the requiring package, if possible. Often it stops installing this package.
  • (4) With apt-get update you download what is needed to rebuild the list of dependencies.
    After that you can try apt-get install --fix-missing again, in the hope that the updated list fixes the problem by itself.
    This can be very useful at times, such as when you add a source for packages in your /etc/atp/sources.list, or when the package index files have been updated.

Not all the programs you can use under Ubuntu came from the official Ubuntu repositories, and are updated with the same versions -- this is rare.

Moreover, there are many reasons why an installation can be abruptly interrupted (A kill signal, a power shortage, a failure of graphic driver...) In those situations, apt-get update may not work, so you first need to fix the problem with apt-get install --fix-missing or with some dpkg commands.

You can see apt-get install --fix-missing as a light and friendly version of commands like dpkg-reconfigure --all or dpkg.

Hastur
  • 3,950
  • 56
    This has been heavily upvoted but I, for one, can't understand a word of it. – LondonRob May 06 '15 at 12:20
  • 1
    @LondonRob I find the name fix-missing misleading compared to ignore-missing. Rouglhy, it seems to mean that, if some packages can't be found or fail to download correctly, then they are silently ignored. Thus the whole install command will not fail, some things may have been installed at the end, but the result state may be incorrect : some required packages may not have been installed. And it appears that the command can be used to restore from a bad state too. – Lenormju Jul 26 '22 at 15:39