diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
index ac60c0dff13bb..90eaebd0b431d 100644
--- a/caffe2/CMakeLists.txt
+++ b/caffe2/CMakeLists.txt
@@ -1147,9 +1147,6 @@ endif()
install(DIRECTORY "${TORCH_SRC_DIR}/csrc"
DESTINATION ${TORCH_INSTALL_INCLUDE_DIR}/torch
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
-install(DIRECTORY "${TORCH_SRC_DIR}/csrc/distributed/c10d"
- DESTINATION ${TORCH_INSTALL_INCLUDE_DIR}
- FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
install(FILES
"${TORCH_SRC_DIR}/script.h"
"${TORCH_SRC_DIR}/extension.h"
diff --git a/setup.py b/setup.py
index 84b97ea0e6a99..99a26599d22ae 100644
--- a/setup.py
+++ b/setup.py
@@ -1062,8 +1062,6 @@ def main():
'include/c10/cuda/impl/*.h',
'include/c10/hip/*.h',
'include/c10/hip/impl/*.h',
- 'include/c10d/*.h',
- 'include/c10d/*.hpp',
'include/caffe2/**/*.h',
'include/torch/*.h',
'include/torch/csrc/*.h',
@@ -1094,7 +1092,8 @@ def main():
'include/torch/csrc/deploy/*.h',
'include/torch/csrc/deploy/interpreter/*.h',
'include/torch/csrc/deploy/interpreter/*.hpp',
- 'include/torch/csrc/distributed/c10d/exception.h',
+ 'include/torch/csrc/distributed/c10d/*.h',
+ 'include/torch/csrc/distributed/c10d/*.hpp',
'include/torch/csrc/distributed/rpc/*.h',
'include/torch/csrc/jit/*.h',
'include/torch/csrc/jit/backends/*.h',