Snapshot of commit d5ec1d5018ed24f1b4f32b1d09df6dbd7e2fc425

from branch master of git://git.jetbrains.org/idea/community.git
diff --git a/build/deb/control/postrm b/build/deb/control/postrm
new file mode 100755
index 0000000..45baf62
--- /dev/null
+++ b/build/deb/control/postrm
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+
+export PRODUCT=@product@
+export BUILD=@build@
+
+# Removing binary files
+export TARGET_FOLDER=/opt/jetbrains/${PRODUCT}
+rm -rf ${TARGET_FOLDER}
+if [ -d ${TARGET_FOLDER} ]
+then
+    	echo Removing ${TARGET_FOLDER} folder failed, remove it manually later.
+fi
+
+# Updating menus
+if [ -x "`which update-menus 2>/dev/null`" ]; then 
+	update-menus ; 
+fi
+