diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 478785b3cb7169fa4610f1c28e4cd6e049273c8b..be319e21607042d334d7f25e6047d9b8854cc87e 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -170,13 +170,6 @@ if(ENABLE_KSPACE)
   endif()
 endif()
 
-if(ENABLE_MISC)
-  option(LAMMPS_XDR "include XDR compatibility files for doing particle dumps in XTC format" OFF)
-  if(LAMMPS_XDR)
-    add_definitions(-DLAMMPS_XDR) # for liblammps
-  endif()
-endif()
-
 if(ENABLE_MSCG OR ENABLE_USER-ATC OR ENABLE_USER-AWPMD OR ENABLE_USER-QUIP OR ENABLE_LATTE)
   find_package(LAPACK)
   if(NOT LAPACK_FOUND)
diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt
index 7761f77233df4b8adff3d0bf570ffaeb98ebb00f..affcae1e5494fdd02d5849298cb7f50dc760c186 100644
--- a/doc/src/Section_start.txt
+++ b/doc/src/Section_start.txt
@@ -259,7 +259,6 @@ within the LAMMPS code.  The options that are currently recognized are:
 -DLAMMPS_PNG
 -DLAMMPS_FFMPEG
 -DLAMMPS_MEMALIGN
--DLAMMPS_XDR
 -DLAMMPS_SMALLBIG
 -DLAMMPS_BIGBIG
 -DLAMMPS_SMALLSMALL
@@ -308,11 +307,6 @@ has to be aligned on larger than default byte boundaries (e.g. 16
 bytes instead of 8 bytes on x86 type platforms) for optimal
 performance.
 
-If you use -DLAMMPS_XDR, the build will include XDR compatibility
-files for doing particle dumps in XTC format.  This is only necessary
-if your platform does have its own XDR files available.  See the
-Restrictions section of the "dump"_dump.html command for details.
-
 Use at most one of the -DLAMMPS_SMALLBIG, -DLAMMPS_BIGBIG,
 -DLAMMPS_SMALLSMALL settings.  The default is -DLAMMPS_SMALLBIG. These
 settings refer to use of 4-byte (small) vs 8-byte (big) integers
diff --git a/doc/src/dump.txt b/doc/src/dump.txt
index 69a00eb473735f9115bae72efb682095675ff4e6..baaa12804de0236e95824d8efb7cdcfea2b030c1 100644
--- a/doc/src/dump.txt
+++ b/doc/src/dump.txt
@@ -649,20 +649,7 @@ LAMMPS"_Section_start.html#start_3 section for more info.
 
 The {xtc} style is part of the MISC package.  It is only enabled if
 LAMMPS was built with that package.  See the "Making
-LAMMPS"_Section_start.html#start_3 section for more info.  This is
-because some machines may not support the low-level XDR data format
-that XTC files are written with, which will result in a compile-time
-error when a low-level include file is not found.  Putting this style
-in a package makes it easy to exclude from a LAMMPS build for those
-machines.  However, the MISC package also includes two compatibility
-header files and associated functions, which should be a suitable
-substitute on machines that do not have the appropriate native header
-files.  This option can be invoked at build time by adding
--DLAMMPS_XDR to the CCFLAGS variable in the appropriate low-level
-Makefile, e.g. src/MAKE/Makefile.foo.  This compatibility mode has
-been tested successfully on Cray XT3/XT4/XT5 and IBM BlueGene/L
-machines and should also work on IBM BG/P, and Windows XP/Vista/7
-machines.
+LAMMPS"_Section_start.html#start_3 section for more info.
 
 [Related commands:]
 
diff --git a/src/MISC/dump_xtc.h b/src/MISC/dump_xtc.h
index 9be66ca21d0468b91f132b7dbdead4a7a79b336d..3fcc89f4bae1f77000101db6b4524836be6a7529 100644
--- a/src/MISC/dump_xtc.h
+++ b/src/MISC/dump_xtc.h
@@ -21,13 +21,7 @@ DumpStyle(xtc,DumpXTC)
 #define LMP_DUMP_XTC_H
 
 #include "dump.h"
-
-#ifdef LAMMPS_XDR
 #include "xdr_compat.h"
-#else
-#include "rpc/rpc.h"
-#include "rpc/xdr.h"
-#endif
 
 namespace LAMMPS_NS {
 
diff --git a/src/MISC/xdr_compat.cpp b/src/MISC/xdr_compat.cpp
index 12bc777b90674bf5b7df6e3d005c46389a804a32..9483070fee919f50b14e1b2dd1f0b8384988bbda 100644
--- a/src/MISC/xdr_compat.cpp
+++ b/src/MISC/xdr_compat.cpp
@@ -1,5 +1,3 @@
-#ifdef LAMMPS_XDR
-
 #include <stdlib.h>
 #include <limits.h>
 #include <string.h>
@@ -714,9 +712,3 @@ xdrstdio_putuint32 (XDR *xdrs, xdr_uint32_t *ip)
 }
 #endif
 
-#else
-/* satisfy compilers that do not like to compile empty files. */
-static void i_am_a_dummy_subroutine(void) {
-  return;
-}
-#endif