diff --git a/scripts/executing_commands_for_glibc.sh b/scripts/executing_commands_for_glibc.sh
index 0ae2c4fe..58b48d8a 100755
--- a/scripts/executing_commands_for_glibc.sh
+++ b/scripts/executing_commands_for_glibc.sh
@@ -18,3 +18,5 @@ echo 'Note: BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"'
 # Comment out this line if you want to save the libraries
 # rm -f ${TARGET_DIR}/usr/lib/libstdc++*
 #
+
+rm -f ${TARGET_DIR}/usr/bin/gdbserver
diff --git a/scripts/executing_commands_for_musl.sh b/scripts/executing_commands_for_musl.sh
index 2ee8473c..ddf46850 100755
--- a/scripts/executing_commands_for_musl.sh
+++ b/scripts/executing_commands_for_musl.sh
@@ -22,3 +22,5 @@ ln -sfv ../../lib/libc.so ${TARGET_DIR}/usr/bin/ldd
 if ! grep -q ^BR2_PACKAGE_WIFIBROADCAST=y ${BR2_CONFIG}; then
 	rm -f ${TARGET_DIR}/usr/lib/libstdc++*
 fi
+
+rm -f ${TARGET_DIR}/usr/bin/gdbserver
diff --git a/scripts/executing_commands_for_uclibc.sh b/scripts/executing_commands_for_uclibc.sh
index 3651e9ff..7a3f3565 100755
--- a/scripts/executing_commands_for_uclibc.sh
+++ b/scripts/executing_commands_for_uclibc.sh
@@ -15,3 +15,9 @@ fi
 #
 echo 'Note: BR2_TOOLCHAIN_BUILDROOT_LIBC="uclibc"'
 #
+
+if ! grep -q ^BR2_PACKAGE_WIFIBROADCAST=y ${BR2_CONFIG}; then
+	rm -f ${TARGET_DIR}/usr/lib/libstdc++*
+fi
+
+rm -f ${TARGET_DIR}/usr/bin/gdbserver
\ No newline at end of file