--- /dev/null
+#!/bin/sh
+
+# Author: Thimo Neubauer <thimo@debian.org>
+# $Id: postinst,v 1.13 2002/09/08 19:44:17 thimo Exp $
+
+set -e
+
+#
+## delete config-data from the old suid-question
+#
+
+# in pre-debconf-times gnuplot saved the answer in /etc/gnuplot.conf
+if [ -e /etc/gnuplot.conf ]; then
+ rm /etc/gnuplot.conf
+fi
+
+# if debconf is installed, try to remove old question
+if [ -e /usr/share/debconf/confmodule ]; then
+ # include debconf stuff
+ . /usr/share/debconf/confmodule
+
+ # remove template/value a previous gnuplot version may have left
+ db_purge
+fi
+
+# also delete the eventual statoverride (if set)
+set +e
+dpkg-statoverride --remove /usr/bin/gnuplot > /dev/null 2>&1
+set -e
+
+# ... and finally reset a possibly set suid-flag
+chmod 755 /usr/bin/gnuplot
+
+#DEBHELPER#