diff --git a/BUILD b/BUILD
index e25359d454822c7017c0fa546c1f0f03b781272f..916f24eaf6857708ddde1c26103099f4e8279b7f 100644
--- a/BUILD
+++ b/BUILD
@@ -765,29 +765,6 @@ cc_library(
 )
 
 
-cc_library(
-  name = "pubsub_client_lib",
-  srcs = [
-    "examples/pubsub/label.proto",
-    "examples/pubsub/empty.proto",
-    "examples/pubsub/pubsub.proto",
-    "examples/pubsub/publisher.cc",
-    "examples/pubsub/subscriber.cc",
-  ],
-  hdrs = [
-  ],
-  includes = [
-    "include",
-    ".",
-  ],
-  deps = [
-    ":grpc++",
-    ":grpc",
-    ":gpr",
-  ],
-)
-
-
 cc_library(
   name = "grpc_csharp_ext",
   srcs = [
diff --git a/templates/BUILD.template b/templates/BUILD.template
index 8303b9f8e9631a40ebe12da611c24f003cf56f4c..fdf87bd29fc6448f4de4809a0bb5d5cfa7f88523 100644
--- a/templates/BUILD.template
+++ b/templates/BUILD.template
@@ -54,7 +54,7 @@ def get_deps(target_dict):
 %>
 
 % for lib in libs:
-% if lib.build != "private":
+% if lib.build in ("all", "protoc"):
 ${cc_library(lib)}
 % endif
 % endfor