diff --git a/update_desktop.sh b/update_desktop.sh
index 3b620c669b5f94a6fc2a9be0cd607782bb2012b8..f5061f7cdf959f1076c9997d9c2e8b080804a18e 100644
--- a/update_desktop.sh
+++ b/update_desktop.sh
@@ -12,7 +12,7 @@ function full_update(){
   git checkout -b "$apply_branch"
   apply_conf="$(mktemp /tmp/custom_patchXXXXX)"
   echo "# You can edit this file to manipulate ordering and patches to apply" > "$apply_conf"
-  git branch -a | grep -Ev 'master|remotes' | grep 'patch/' | cut -c 3- >> "$apply_conf"
+  git branch -a | grep -Ev '^master$|remotes' | grep 'patch/' | cut -c 3- >> "$apply_conf"
   echo "$EDITOR"
   if [ -z ${EDITOR+x} ];then
     echo -e "${RED}\$EDITOR env is not found${NC}.\nTry this before running script: 'export EDITOR=/bin/vim'"