diff --git a/presto-server-rpm/pom.xml b/presto-server-rpm/pom.xml
index be6be69c954ff..4c7faccc07939 100644
--- a/presto-server-rpm/pom.xml
+++ b/presto-server-rpm/pom.xml
@@ -83,6 +83,7 @@
x86_64
src/main/rpm/preinstall
src/main/rpm/postinstall
+ src/main/rpm/preremove
src/main/rpm/postremove
diff --git a/presto-server-rpm/src/main/rpm/preremove b/presto-server-rpm/src/main/rpm/preremove
new file mode 100644
index 0000000000000..319d2af06a257
--- /dev/null
+++ b/presto-server-rpm/src/main/rpm/preremove
@@ -0,0 +1,5 @@
+/etc/init.d/presto status > /dev/null 2>&1
+if [[ $? != 3 ]]; then
+ echo "Please stop the Presto service before erasing RPM"
+ exit 1
+fi