diff --git a/debian/scripts/postrm b/debian/scripts/postrm
index f4c7218a2ebb4c62ae67e560690f46fd1d77b7ce..a768a036c3a812c5a08beab68a43ba9b7d47335a 100755
--- a/debian/scripts/postrm
+++ b/debian/scripts/postrm
@@ -1,4 +1,12 @@
 #!/bin/sh
+
+# $1 is either "remove" or "purge". Since there are no config
+# files left after a remove, exit here if called with "purge".
+# This avoids calling userdel again which would cause an error.
+if [ "$1" = "purge" ]; then
+	exit 0;
+fi
+
 I2PUSER=i2psvc
 exec userdel $I2PUSER