Lintian ReportsBETA

Wpostrm-removes-alternative

Tag versions

The tag is present in Lintian version 2.108.13. That is the most recent version we know about.

update-alternatives --remove <alternative> foo is called in the postrm. This can be dangerous because at the time the postrm is executed foo has already been deleted and update-alternatives will ignore it while constructing its list of available alternatives. Then, if the /etc/alternatives symlink points at foo, update-alternatives won't recognize it and will mark the symlink as something site-specific. As such, the symlink will no longer be updated automatically and will be left dangling until update-alternatives --auto <alternative> is run by hand.

update-alternatives --remove should be called in the prerm instead.

Please refer to Debian Policy Manual and the update-alternatives(8) manual page for details.

Visibility: warning

Check: scripts

Renamed from:

The following 157 source packages in the archive triggered the tag 202 times.

We found 4 overrides. The tag performed 98% of the time.