It is well known (as of may 2014) that update-apt-xapian-index consumes loads of memory and can easily render a computer with only 512 MiB of RAM unusable. The indexing tool in question is part of APT, a popular package system on Debian-based Linux distributions like Ubuntu.
This is not just a problem for old PCs and laptops, but for virtual PCs too. Many web hosting services offer inexpensive virtual servers with limited amounts of memory. But even if your real or virtual computer has access to more RAM, you may not want to pay an unnecessary performance penalty every time your OS software packages get updated.
This issue is especially annoying, for Linux is often praised as the best OS for old computers. So you install an allegedly lightweight distribution, like Xubuntu, only to end up facing a laptop thrashing itself to death. I actually came across this problem while trying to upgrade Kubuntu from version 13.10 to 14.04 on an old laptop. The upgrade process triggers an index update, and the indexer does not wait until any current package operations are complete, but starts immediately in the background. The distro upgrader gave then a time estimate of over 24 hours. Because I was expecting heavy APT operations during a system upgrade, it took me a while to realise what was going on.
The problems that update-apt-xapian-index cause in low-memory machines have been reported many years ago, and they still have not been fixed. I wonder how come the indexer needs over 200 MiB RAM in order to index a package database. I also verified that a fresh Xubuntu 14.04 installation does install apt-xapian-index by default, which is a poor choice. Well, at least they try running the indexer as a low-priority process (see /etc/cron.weekly/apt-xapian-index) but I guess that does not help against virtual memory thrashing. I am not sure yet what priority the indexer runs with if triggered as part of a package sources update (instead of from a weekly task).
Overcoming this issue is not straightforward. Removing apt-xapian-index is not feasible, because some package managers like Muon depend on it. In the case of Muon, such a 'hard' dependency is wrong (in my opinion). Synaptic, for example, has only a 'suggested' dependency. But even a 'recommended' or 'suggested' dependency may bring apt-xapian-index back, if you are not paying attention while installing packages. Unfortunately, the Debian APT package system does not provide an easy way to blacklist a package, which is an inexplicable shortcoming too. I tried APT's 'pinning' feature, but that does not seem to reliably prevent a package from being installed in the future. I also don't want to edit package system configuration files on every Linux PC I have to administer.
At this point, it certainly feels like a good-orchestrated conspiracy! It looks like the guys behind Xapian, Ubuntu, Debian's APT, Muon, etc. really want you to buy a new PC. But instead of despairing, let's organise ourselves in order to break that malicious, socially-condemnable business model. 8-)
This fake APT package helps get rid of the whole apt-xapian-index package without collateral dependency damage. The fake package is actually empty, but still presents itself as a newer version of apt-xapian-index. The advertised version number 999 should always be considered newer than any future version the real apt-xapian-index maintainer ever releases.
If the real apt-xapian-index is already installed in your system, 'upgrading' it with this fake package will effectively remove it. No other packages will be automatically removed as a side effect, as the fake package still satisfies all dependencies other packages may have on apt-xapian-index.
If real apt-xapian-index package is not installed yet, you can still install the fake one as a preventive measure. This way, the real package will never get installed by mistake.
Should you decide that you want the real package back, simply uninstall the 'newer' fake version, and the system's normal version will become available again for installation.
Beware that installing the fake replacement package may break software that depends on the real apt-xapian-index tools. Some package management tools, like Synaptic, can live without them. In fact, Synaptic automatically reverts back to its own built-in search function, which is slower and less comfortable, but still does the job adequately.
Other software might pose problems. For example, the Muon package manager does not crash or misbehave when the fake package is installed, but its search box simply does not work any more, and there is no built-in alternative. Therefore, you will have to browse the packages by hand, which means a lot of clicking and scrolling. In this case, it's probably best to look for suitable packages online, and using Muon only when you know the exact package name you want to install. Or you may be better off switching to an alternative tool like Synaptic. I do not know yet how other package managers or APT tools will react to the fake package's deception. If you hit further issues, please drop me a line at rdiezmail-tools at yahoo.de .