Package: mlocate Version: 1.1.10-2 Severity: normal I have noticed that some cruft remained on the system after purging the mlocate package, namely
- a dangling symlink /etc/systemd/system/timers.target.wants/mlocate.timer - a statoverride for /usr/bin/mlocate in the dpkg database The postrm script in mlocate version 0.26-5 cleaned these up on purge, for the transitional package it might make more sense to do it in the postinst. See the attached log file which reproduces the problems in a throwaway chroot (install mlocate 0.26-5, upgrade to 1.1.10-2 and purge the package). -- System Information: Debian Release: bookworm/sid APT prefers unstable APT policy: (500, 'unstable'), (101, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.10.61-nouveau (SMP w/2 CPU threads) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
# find / -name "mlocate*" /var/cache/apt/archives/mlocate_0.26-5_amd64.deb # dpkg -i $(find / -name "mlocate*") Selecting previously unselected package mlocate. (Reading database ... 12635 files and directories currently installed.) Preparing to unpack .../mlocate_0.26-5_amd64.deb ... Unpacking mlocate (0.26-5) ... Setting up mlocate (0.26-5) ... update-alternatives: using /usr/bin/mlocate to provide /usr/bin/locate (locate) in auto mode Adding group `mlocate' (GID 102) ... Done. # apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following NEW packages will be installed: liburing1 plocate The following packages will be upgraded: mlocate 1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 4544 B/133 kB of archives. After this operation, 57.3 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://ftp.de.debian.org/debian sid/main amd64 mlocate all 1.1.10-2 [4544 B] Fetched 4544 B in 0s (9658 B/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package liburing1:amd64. (Reading database ... 12698 files and directories currently installed.) Preparing to unpack .../liburing1_0.7-3_amd64.deb ... Unpacking liburing1:amd64 (0.7-3) ... Preparing to unpack .../mlocate_1.1.10-2_all.deb ... Unpacking mlocate (1.1.10-2) over (0.26-5) ... Selecting previously unselected package plocate. Preparing to unpack .../plocate_1.1.10-2_amd64.deb ... Unpacking plocate (1.1.10-2) ... Setting up liburing1:amd64 (0.7-3) ... Setting up plocate (1.1.10-2) ... Installing new version of config file /etc/updatedb.conf ... update-alternatives: warning: alternative /usr/bin/mlocate (part of link group locate) doesn't exist; removing from list of alternatives update-alternatives: warning: /etc/alternatives/locate is dangling; it will be updated with best choice update-alternatives: using /usr/bin/plocate to provide /usr/bin/locate (locate) in auto mode Adding group `plocate' (GID 103) ... Done. Setting up mlocate (1.1.10-2) ... Removing obsolete conffile /etc/cron.daily/mlocate ... Processing triggers for libc-bin (2.31-17) ... # apt purge mlocate Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: liburing1 plocate Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: mlocate* 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 14.3 kB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 12659 files and directories currently installed.) Removing mlocate (1.1.10-2) ... (Reading database ... 12656 files and directories currently installed.) Purging configuration files for mlocate (1.1.10-2) ... # find / -name "mlocate*" /etc/systemd/system/timers.target.wants/mlocate.timer /var/cache/apt/archives/mlocate_0.26-5_amd64.deb /var/lib/systemd/deb-systemd-helper-enabled/timers.target.wants/mlocate.timer /var/lib/systemd/deb-systemd-helper-enabled/mlocate.timer.dsh-also # dpkg-statoverride --list | grep mlocate root mlocate 2755 /usr/bin/mlocate