Stop deleting system user/group on remove/purge
authorLuca Boccassi <luca.boccassi@gmail.com>
Sun, 3 May 2026 13:47:25 +0000 (14:47 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 3 May 2026 13:47:25 +0000 (14:47 +0100)
Removing system users/groups on purge is considered bad practice,
as the kernel recycles UIDs/GIDs. So any potential leftover
file/directory can then become owned by the next user/group that
gets added, with unpredictable consequences.

debian/dcmtk.postrm

index b8efc7e458d918dc573f8ba4799363fd4858a33b..b4c19e5a7badda6df8821db907004664084ecb47 100644 (file)
@@ -19,11 +19,5 @@ if [ "$1" = "purge" ] ; then
    fi
 fi
 
-# Remove dcmtk user/group if they exist on cleanup
-if id -u "dcmtk" > /dev/null 2>&1; then
-       echo "Removing \`dcmtk' user and group from the system..."
-       userdel dcmtk
-fi
-
 #DEBHELPER#