diff --git a/src/freedombone-app-dlna b/src/freedombone-app-dlna
index 52e93b4d65cbf878d2d5403ee0214cd7b2556a19..36358f388cb9b1b0c1c751d2f107ec9675e38c45 100755
--- a/src/freedombone-app-dlna
+++ b/src/freedombone-app-dlna
@@ -49,6 +49,22 @@ function configure_firewall_for_dlna {
 	echo 'configure_firewall_for_dlna' >> $COMPLETION_FILE
 }
 
+function remove_dlna_server {
+	if ! grep -Fxq "install_dlna_server" $COMPLETION_FILE; then
+		return
+	fi
+	service minidlna stop
+	apt-get -y remove --purge minidlna
+	if [ -f /etc/minidlna.conf ]; then
+		rm /etc/minidlna.conf
+	fi
+	iptables -D INPUT -p udp --dport 1900 -j ACCEPT
+	iptables -D INPUT -p tcp --dport 8200 -j ACCEPT
+	function_check save_firewall_settings
+	save_firewall_settings
+	sed -i '/install_dlna_server/d' $COMPLETION_FILE
+}
+
 function install_dlna_server {
 	if grep -Fxq "install_dlna_server" $COMPLETION_FILE; then
 		return