diff --git a/debian/rules b/debian/rules
index a4b9d0459fe2cfc3ecf6299b6689ee1d6d8006fa..cc750bedb876a19f8ba7c3792e8ea07ed3a9083d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,12 @@ export DEB_BUILD_OPTIONS=nocheck
 override_dh_auto_configure:
 	dh_auto_configure -- -DGENERATE_DOC=ON
 
+# Remove useless ldconfig call.
+override_dh_makeshlibs:
+	dh_makeshlibs --
+	rm debian/libsot-dynamic1.0.0.99.postinst.debhelper
+	rm debian/libsot-dynamic1.0.0.99.postrm.debhelper
+
 # FIXME: this is only necessary because some binaries are linked against
 # plug-ins.
 # Teach dh_shlibdeps where the plug-in are located.