diff --git a/src/freedombone-app-gogs b/src/freedombone-app-gogs
index bbf0f452e559ce40e35cc361c3591bc4a638e0e1..2bee2fd401162259f127317936ffee54b26acfab 100755
--- a/src/freedombone-app-gogs
+++ b/src/freedombone-app-gogs
@@ -35,6 +35,31 @@ GIT_DOMAIN_REPO="https://github.com/gogits/gogs"
 GIT_ADMIN_PASSWORD=
 GOGS_COMMIT='3fb4f7f4980b4339fd9ef6a3ba5b0acab83d264d'
 
+function remove_gogs {
+	if ! grep -Fxq "install_gogs" $COMPLETION_FILE; then
+		return
+	fi
+	function_check select_go_version
+	select_go_version
+
+	systemctl stop gogs
+	systemctl disable gogs
+	nginx_dissite $GIT_DOMAIN_NAME
+	if [ -d /var/www/$GIT_DOMAIN_NAME ]; then
+		rm -rf /var/www/$GIT_DOMAIN_NAME
+	fi
+	if [ -f /etc/nginx/sites-available/$GIT_DOMAIN_NAME ]; then
+		rm /etc/nginx/sites-available/$GIT_DOMAIN_NAME
+	fi
+	function_check drop_database
+	drop_database gogs
+	rm /etc/systemd/system/gogs.service
+	rm -rf $GOPATH/src/github.com/gogits
+	userdel -r git
+	sed -i '/install_gogs/d' $COMPLETION_FILE
+	sed -i '/Gogs /d' $COMPLETION_FILE
+}
+
 function install_gogs {
 	if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
 		return