diff --git a/src/force.cpp b/src/force.cpp
index 8eef7a4224..701113d7ef 100644
--- a/src/force.cpp
+++ b/src/force.cpp
@@ -31,9 +31,7 @@
 #include "pair.h"
 #include "pair_hybrid.h"
 #include "pair_hybrid_overlay.h"
-#include "update.h"
 
-#include <cctype>
 #include <cstring>
 
 using namespace LAMMPS_NS;
diff --git a/src/force.h b/src/force.h
index 999e9650aa..1302e20f12 100644
--- a/src/force.h
+++ b/src/force.h
@@ -19,6 +19,12 @@
 #include <map>
 
 namespace LAMMPS_NS {
+  class Angle;
+  class Bond;
+  class Dihedral;
+  class Improper;
+  class KSpace;
+  class Pair;
 
 class Force : protected Pointers {
  public:
@@ -47,23 +53,23 @@ class Force : protected Pointers {
 
   int newton,newton_pair,newton_bond;   // Newton's 3rd law settings
 
-  class Pair *pair;
+  Pair *pair;
   char *pair_style;
   char *pair_restart;
 
-  class Bond *bond;
+  Bond *bond;
   char *bond_style;
 
-  class Angle *angle;
+  Angle *angle;
   char *angle_style;
 
-  class Dihedral *dihedral;
+  Dihedral *dihedral;
   char *dihedral_style;
 
-  class Improper *improper;
+  Improper *improper;
   char *improper_style;
 
-  class KSpace *kspace;
+  KSpace *kspace;
   char *kspace_style;
 
   typedef Pair *(*PairCreator)(LAMMPS *);
@@ -102,29 +108,29 @@ class Force : protected Pointers {
   void setup();
 
   void create_pair(const std::string &, int);
-  class Pair *new_pair(const std::string &, int, int &);
-  class Pair *pair_match(const std::string &, int, int nsub=0);
+  Pair *new_pair(const std::string &, int, int &);
+  Pair *pair_match(const std::string &, int, int nsub=0);
   char *pair_match_ptr(Pair *);
 
   void create_bond(const std::string &, int);
-  class Bond *new_bond(const std::string &, int, int &);
-  class Bond *bond_match(const std::string &);
+  Bond *new_bond(const std::string &, int, int &);
+  Bond *bond_match(const std::string &);
 
   void create_angle(const std::string &, int);
-  class Angle *new_angle(const std::string &, int, int &);
-  class Angle *angle_match(const std::string &);
+  Angle *new_angle(const std::string &, int, int &);
+  Angle *angle_match(const std::string &);
 
   void create_dihedral(const std::string &, int);
-  class Dihedral *new_dihedral(const std::string &, int, int &);
-  class Dihedral *dihedral_match(const std::string &);
+  Dihedral *new_dihedral(const std::string &, int, int &);
+  Dihedral *dihedral_match(const std::string &);
 
   void create_improper(const std::string &, int);
-  class Improper *new_improper(const std::string &, int, int &);
-  class Improper *improper_match(const std::string &);
+  Improper *new_improper(const std::string &, int, int &);
+  Improper *improper_match(const std::string &);
 
   void create_kspace(const std::string &, int);
-  class KSpace *new_kspace(const std::string &, int, int &);
-  class KSpace *kspace_match(const std::string &, int);
+  KSpace *new_kspace(const std::string &, int, int &);
+  KSpace *kspace_match(const std::string &, int);
 
   void store_style(char *&, const std::string &, int);
   void set_special(int, char **);
diff --git a/src/imbalance_group.cpp b/src/imbalance_group.cpp
index b7be70dd25..f604f150b5 100644
--- a/src/imbalance_group.cpp
+++ b/src/imbalance_group.cpp
@@ -15,7 +15,6 @@
 
 #include "atom.h"
 #include "error.h"
-#include "force.h"
 #include "group.h"
 
 using namespace LAMMPS_NS;
diff --git a/src/input.cpp b/src/input.cpp
index 84abaf141f..1cb7893871 100644
--- a/src/input.cpp
+++ b/src/input.cpp
@@ -25,7 +25,6 @@
 #include "dihedral.h"
 #include "domain.h"
 #include "error.h"
-#include "fix.h"
 #include "force.h"
 #include "group.h"
 #include "improper.h"
@@ -44,7 +43,6 @@
 #include "update.h"
 #include "variable.h"
 
-#include <cstdlib>
 #include <cstring>
 #include <errno.h>
 #include <cctype>
diff --git a/src/min.cpp b/src/min.cpp
index 0bf0445525..6bcb4b4e2e 100644
--- a/src/min.cpp
+++ b/src/min.cpp
@@ -20,32 +20,32 @@
 ------------------------------------------------------------------------- */
 
 #include "min.h"
-#include <mpi.h>
-#include <cmath>
-#include <cstring>
+
+#include "angle.h"
 #include "atom.h"
 #include "atom_vec.h"
-#include "domain.h"
-#include "comm.h"
-#include "update.h"
-#include "modify.h"
-#include "fix_minimize.h"
-#include "compute.h"
-#include "neighbor.h"
-#include "force.h"
-#include "pair.h"
 #include "bond.h"
-#include "angle.h"
+#include "comm.h"
+#include "compute.h"
 #include "dihedral.h"
+#include "domain.h"
+#include "error.h"
+#include "fix_minimize.h"
+#include "force.h"
 #include "improper.h"
 #include "kspace.h"
-#include "output.h"
-#include "thermo.h"
-#include "timer.h"
 #include "math_const.h"
 #include "memory.h"
-#include "error.h"
-#include "fmt/format.h"
+#include "modify.h"
+#include "neighbor.h"
+#include "output.h"
+#include "pair.h"
+#include "thermo.h"
+#include "timer.h"
+#include "update.h"
+
+#include <cmath>
+#include <cstring>
 
 using namespace LAMMPS_NS;
 using namespace MathConst;
diff --git a/src/min_fire.cpp b/src/min_fire.cpp
index 53bedfbb6c..b7225a1a5a 100644
--- a/src/min_fire.cpp
+++ b/src/min_fire.cpp
@@ -16,21 +16,18 @@
                          Erik Bitzek, FAU Erlangen-Nuernberg
 ------------------------------------------------------------------------- */
 
-#include <cmath>
 #include "min_fire.h"
-#include "universe.h"
+
 #include "atom.h"
+#include "comm.h"
+#include "error.h"
 #include "force.h"
-#include "update.h"
 #include "output.h"
 #include "timer.h"
-#include "error.h"
-#include "variable.h"
-#include "modify.h"
-#include "compute.h"
-#include "domain.h"
-#include "neighbor.h"
-#include "comm.h"
+#include "universe.h"
+#include "update.h"
+
+#include <cmath>
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo.cpp b/src/ntopo.cpp
index ca63b85328..d4ddcc7fc0 100644
--- a/src/ntopo.cpp
+++ b/src/ntopo.cpp
@@ -12,13 +12,13 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo.h"
-#include <mpi.h>
+
 #include "atom.h"
-#include "neighbor.h"
 #include "comm.h"
 #include "domain.h"
-#include "memory.h"
 #include "error.h"
+#include "memory.h"
+#include "neighbor.h"
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_angle_all.cpp b/src/ntopo_angle_all.cpp
index 71521e6891..21ac894d92 100644
--- a/src/ntopo_angle_all.cpp
+++ b/src/ntopo_angle_all.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_angle_all.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "force.h"
 #include "domain.h"
@@ -21,7 +21,7 @@
 #include "thermo.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_angle_partial.cpp b/src/ntopo_angle_partial.cpp
index c72073718e..583339ed11 100644
--- a/src/ntopo_angle_partial.cpp
+++ b/src/ntopo_angle_partial.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_angle_partial.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "force.h"
 #include "domain.h"
@@ -21,7 +21,7 @@
 #include "thermo.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_angle_template.cpp b/src/ntopo_angle_template.cpp
index d6303a0ad4..17e17ca462 100644
--- a/src/ntopo_angle_template.cpp
+++ b/src/ntopo_angle_template.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_angle_template.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "atom_vec.h"
 #include "force.h"
@@ -23,7 +23,7 @@
 #include "molecule.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_bond_all.cpp b/src/ntopo_bond_all.cpp
index 9fac01bdba..20ec5aa290 100644
--- a/src/ntopo_bond_all.cpp
+++ b/src/ntopo_bond_all.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_bond_all.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "force.h"
 #include "domain.h"
@@ -21,7 +21,7 @@
 #include "thermo.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_bond_partial.cpp b/src/ntopo_bond_partial.cpp
index 138f8f4330..9b5914b2c8 100644
--- a/src/ntopo_bond_partial.cpp
+++ b/src/ntopo_bond_partial.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_bond_partial.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "force.h"
 #include "domain.h"
@@ -21,7 +21,7 @@
 #include "thermo.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_bond_template.cpp b/src/ntopo_bond_template.cpp
index a651715320..88a31460d9 100644
--- a/src/ntopo_bond_template.cpp
+++ b/src/ntopo_bond_template.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_bond_template.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "atom_vec.h"
 #include "force.h"
@@ -23,7 +23,7 @@
 #include "molecule.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_dihedral_all.cpp b/src/ntopo_dihedral_all.cpp
index 81193605c1..bcfe8ce712 100644
--- a/src/ntopo_dihedral_all.cpp
+++ b/src/ntopo_dihedral_all.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_dihedral_all.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "force.h"
 #include "domain.h"
@@ -21,7 +21,7 @@
 #include "thermo.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_dihedral_partial.cpp b/src/ntopo_dihedral_partial.cpp
index 855fa800b6..31a78c5c48 100644
--- a/src/ntopo_dihedral_partial.cpp
+++ b/src/ntopo_dihedral_partial.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_dihedral_partial.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "force.h"
 #include "domain.h"
@@ -21,7 +21,7 @@
 #include "thermo.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_dihedral_template.cpp b/src/ntopo_dihedral_template.cpp
index 06fac50400..0d2a9451e0 100644
--- a/src/ntopo_dihedral_template.cpp
+++ b/src/ntopo_dihedral_template.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_dihedral_template.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "atom_vec.h"
 #include "force.h"
@@ -23,7 +23,7 @@
 #include "molecule.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_improper_all.cpp b/src/ntopo_improper_all.cpp
index e839e9161b..53f229a86a 100644
--- a/src/ntopo_improper_all.cpp
+++ b/src/ntopo_improper_all.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_improper_all.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "force.h"
 #include "domain.h"
@@ -21,7 +21,7 @@
 #include "thermo.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_improper_partial.cpp b/src/ntopo_improper_partial.cpp
index c4c6ec3177..8fc619c9e4 100644
--- a/src/ntopo_improper_partial.cpp
+++ b/src/ntopo_improper_partial.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_improper_partial.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "force.h"
 #include "domain.h"
@@ -21,7 +21,7 @@
 #include "thermo.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/ntopo_improper_template.cpp b/src/ntopo_improper_template.cpp
index 060ba173fd..bd19d5877c 100644
--- a/src/ntopo_improper_template.cpp
+++ b/src/ntopo_improper_template.cpp
@@ -12,7 +12,7 @@
 ------------------------------------------------------------------------- */
 
 #include "ntopo_improper_template.h"
-#include <mpi.h>
+
 #include "atom.h"
 #include "atom_vec.h"
 #include "force.h"
@@ -23,7 +23,7 @@
 #include "molecule.h"
 #include "memory.h"
 #include "error.h"
-#include "fmt/format.h"
+
 
 using namespace LAMMPS_NS;
 
diff --git a/src/output.cpp b/src/output.cpp
index 16d2fa54a0..9b091f89a2 100644
--- a/src/output.cpp
+++ b/src/output.cpp
@@ -12,27 +12,25 @@
 ------------------------------------------------------------------------- */
 
 #include "output.h"
-#include <mpi.h>
-#include <cstring>
-#include <string>
 #include "style_dump.h"
+
 #include "atom.h"
-#include "neighbor.h"
-#include "input.h"
-#include "variable.h"
 #include "comm.h"
-#include "update.h"
-#include "group.h"
 #include "domain.h"
-#include "thermo.h"
-#include "modify.h"
-#include "force.h"
 #include "dump.h"
-#include "write_restart.h"
-#include "memory.h"
 #include "error.h"
-#include "utils.h"
-#include "fmt/format.h"
+#include "force.h"
+#include "group.h"
+#include "input.h"
+#include "memory.h"
+#include "modify.h"
+#include "neighbor.h"
+#include "thermo.h"
+#include "update.h"
+#include "variable.h"
+#include "write_restart.h"
+
+#include <cstring>
 
 using namespace LAMMPS_NS;
 
diff --git a/src/output.h b/src/output.h
index 1bf4128ee0..06be7b244a 100644
--- a/src/output.h
+++ b/src/output.h
@@ -15,11 +15,13 @@
 #define LMP_OUTPUT_H
 
 #include "pointers.h"
+
 #include <map>
-#include <string>
 
 namespace LAMMPS_NS {
 
+class Dump;
+
 class Output : protected Pointers {
  public:
   bigint next;                 // next timestep for any kind of output
@@ -39,7 +41,7 @@ class Output : protected Pointers {
   bigint *last_dump;           // last timestep each snapshot was output
   char **var_dump;             // variable name for dump frequency
   int *ivar_dump;              // variable index for dump frequency
-  class Dump **dump;           // list of defined Dumps
+  Dump **dump;                 // list of defined Dumps
 
   int restart_flag;            // 1 if any restart files are written
   int restart_flag_single;     // 1 if single restart files are written
diff --git a/src/pair.cpp b/src/pair.cpp
index e003ef740a..d869bbe8d8 100644
--- a/src/pair.cpp
+++ b/src/pair.cpp
@@ -16,28 +16,26 @@
 ------------------------------------------------------------------------- */
 
 #include "pair.h"
-#include <mpi.h>
+
+#include "atom.h"
+#include "atom_masks.h"
+#include "comm.h"
+#include "compute.h"
+#include "domain.h"
+#include "error.h"
+#include "force.h"
+#include "kspace.h"
+#include "math_const.h"
+#include "memory.h"
+#include "neighbor.h"
+#include "suffix.h"
+#include "update.h"
+
 #include <cfloat>    // IWYU pragma: keep
 #include <climits>   // IWYU pragma: keep
 #include <cmath>
 #include <cstring>
 #include <ctime>
-#include <string>
-#include "atom.h"
-#include "neighbor.h"
-#include "domain.h"
-#include "comm.h"
-#include "force.h"
-#include "kspace.h"
-#include "compute.h"
-#include "suffix.h"
-#include "atom_masks.h"
-#include "memory.h"
-#include "math_const.h"
-#include "error.h"
-#include "update.h"
-#include "utils.h"
-#include "fmt/format.h"
 
 using namespace LAMMPS_NS;
 using namespace MathConst;
diff --git a/src/pair_coul_streitz.cpp b/src/pair_coul_streitz.cpp
index f98b84417a..e538275b3c 100644
--- a/src/pair_coul_streitz.cpp
+++ b/src/pair_coul_streitz.cpp
@@ -17,22 +17,21 @@
 
 #include "pair_coul_streitz.h"
 
-#include <cmath>
-
-#include <cstring>
 #include "atom.h"
 #include "comm.h"
+#include "error.h"
 #include "force.h"
 #include "kspace.h"
-#include "neighbor.h"
-#include "neigh_list.h"
-#include "neigh_request.h"
 #include "math_const.h"
 #include "memory.h"
-#include "error.h"
-
-
+#include "neigh_list.h"
+#include "neigh_request.h"
+#include "neighbor.h"
 #include "potential_file_reader.h"
+#include "tokenizer.h"
+
+#include <cmath>
+#include <cstring>
 
 using namespace LAMMPS_NS;
 using namespace MathConst;
diff --git a/src/pair_hybrid_overlay.cpp b/src/pair_hybrid_overlay.cpp
index e85973ed6a..34c4cfe418 100644
--- a/src/pair_hybrid_overlay.cpp
+++ b/src/pair_hybrid_overlay.cpp
@@ -12,12 +12,12 @@
 ------------------------------------------------------------------------- */
 
 #include "pair_hybrid_overlay.h"
-#include <cstring>
-#include <cctype>
+
 #include "atom.h"
-#include "force.h"
 #include "error.h"
 
+#include <cstring>
+#include <cctype>
 
 using namespace LAMMPS_NS;
 
diff --git a/src/pair_zero.cpp b/src/pair_zero.cpp
index b34e0b2b82..976bb1ba33 100644
--- a/src/pair_zero.cpp
+++ b/src/pair_zero.cpp
@@ -17,13 +17,12 @@
 
 #include "pair_zero.h"
 
-#include <cstring>
 #include "atom.h"
 #include "comm.h"
-#include "force.h"
 #include "memory.h"
 #include "error.h"
 
+#include <cstring>
 
 using namespace LAMMPS_NS;
 
diff --git a/src/potential_file_reader.cpp b/src/potential_file_reader.cpp
index 62658a9ac5..a71d7944d6 100644
--- a/src/potential_file_reader.cpp
+++ b/src/potential_file_reader.cpp
@@ -15,17 +15,13 @@
    Contributing authors: Richard Berger (Temple U)
 ------------------------------------------------------------------------- */
 
-#include "lammps.h"
-#include "force.h"
-#include "error.h"
-#include "comm.h"
 #include "potential_file_reader.h"
-#include "update.h"
-#include "utils.h"
-#include "tokenizer.h"
-#include "fmt/format.h"
 
-#include <cstring>
+#include "comm.h"
+#include "error.h"
+#include "text_file_reader.h"
+#include "tokenizer.h"
+#include "update.h"
 
 using namespace LAMMPS_NS;
 
diff --git a/src/potential_file_reader.h b/src/potential_file_reader.h
index 9094d3957a..57aa827638 100644
--- a/src/potential_file_reader.h
+++ b/src/potential_file_reader.h
@@ -18,14 +18,13 @@
 #ifndef LMP_POTENTIAL_FILE_READER_H
 #define LMP_POTENTIAL_FILE_READER_H
 
-#include <string>
-
 #include "pointers.h"
 #include "tokenizer.h"
-#include "text_file_reader.h"
 
 namespace LAMMPS_NS
 {
+  class TextFileReader;
+
   class PotentialFileReader : protected Pointers {
   protected:
     TextFileReader *reader;
diff --git a/src/procmap.cpp b/src/procmap.cpp
index 1741e351fe..f80af9330e 100644
--- a/src/procmap.cpp
+++ b/src/procmap.cpp
@@ -16,18 +16,18 @@
 ------------------------------------------------------------------------- */
 
 #include "procmap.h"
-#include <mpi.h>
+
+#include "comm.h"
+#include "domain.h"
+#include "error.h"
+#include "math_extra.h"
+#include "memory.h"
+#include "universe.h"
+
 #include <cmath>
 #include <cstring>
 #include <map>
-#include <string>
 #include <utility>
-#include "universe.h"
-#include "comm.h"
-#include "domain.h"
-#include "math_extra.h"
-#include "memory.h"
-#include "error.h"
 
 using namespace LAMMPS_NS;
 
diff --git a/src/rcb.cpp b/src/rcb.cpp
index 2cc70a2de9..03c99560b3 100644
--- a/src/rcb.cpp
+++ b/src/rcb.cpp
@@ -12,11 +12,12 @@
 ------------------------------------------------------------------------- */
 
 #include "rcb.h"
-#include <mpi.h>
-#include <cstring>
+
 #include "irregular.h"
 #include "memory.h"
 
+#include <cstring>
+
 using namespace LAMMPS_NS;
 
 #define MYHUGE 1.0e30
diff --git a/src/read_data.cpp b/src/read_data.cpp
index 7224ac89ea..7cdb768dd2 100644
--- a/src/read_data.cpp
+++ b/src/read_data.cpp
@@ -16,34 +16,33 @@
 //   before lmptype.h can set flags to insure it is done correctly
 
 #include "read_data.h"
-#include <mpi.h>
-#include <cstring>
-#include <string>
-#include <cctype>
+
+#include "angle.h"
 #include "atom.h"
 #include "atom_vec.h"
 #include "atom_vec_ellipsoid.h"
 #include "atom_vec_line.h"
 #include "atom_vec_tri.h"
-#include "molecule.h"
-#include "group.h"
+#include "bond.h"
 #include "comm.h"
-#include "update.h"
-#include "modify.h"
+#include "dihedral.h"
+#include "domain.h"
+#include "error.h"
 #include "fix.h"
 #include "force.h"
-#include "pair.h"
-#include "domain.h"
-#include "bond.h"
-#include "angle.h"
-#include "dihedral.h"
+#include "group.h"
 #include "improper.h"
-#include "special.h"
 #include "irregular.h"
-#include "error.h"
 #include "memory.h"
-#include "utils.h"
-#include "fmt/format.h"
+#include "modify.h"
+#include "molecule.h"
+#include "pair.h"
+#include "special.h"
+#include "update.h"
+
+#include <string>
+#include <cctype>
+#include <cstring>
 
 using namespace LAMMPS_NS;
 
diff --git a/src/read_dump.cpp b/src/read_dump.cpp
index fbafb4ca84..eb58d3e3ff 100644
--- a/src/read_dump.cpp
+++ b/src/read_dump.cpp
@@ -20,22 +20,19 @@
 //   before lmptype.h can set flags to insure it is done correctly
 
 #include "read_dump.h"
-#include <mpi.h>
-#include <cstring>
-#include <string>
-#include "reader.h"
-#include "style_reader.h"
+
 #include "atom.h"
 #include "atom_vec.h"
-#include "update.h"
-#include "domain.h"
 #include "comm.h"
-#include "force.h"
-#include "irregular.h"
+#include "domain.h"
 #include "error.h"
+#include "irregular.h"
 #include "memory.h"
-#include "utils.h"
-#include "fmt/format.h"
+#include "reader.h"
+#include "style_reader.h"
+#include "update.h"
+
+#include <cstring>
 
 using namespace LAMMPS_NS;
 
diff --git a/src/read_restart.cpp b/src/read_restart.cpp
index 157992bce3..dcab9f834c 100644
--- a/src/read_restart.cpp
+++ b/src/read_restart.cpp
@@ -12,31 +12,30 @@
 ------------------------------------------------------------------------- */
 
 #include "read_restart.h"
-#include <mpi.h>
-#include <cstring>
-#include <dirent.h>
+
+#include "angle.h"
 #include "atom.h"
 #include "atom_vec.h"
-#include "domain.h"
-#include "comm.h"
-#include "irregular.h"
-#include "update.h"
-#include "modify.h"
-#include "fix_read_restart.h"
-#include "group.h"
-#include "force.h"
-#include "pair.h"
 #include "bond.h"
-#include "angle.h"
+#include "comm.h"
 #include "dihedral.h"
+#include "domain.h"
+#include "error.h"
+#include "fix_read_restart.h"
+#include "force.h"
+#include "group.h"
 #include "improper.h"
+#include "irregular.h"
+#include "memory.h"
+#include "modify.h"
+#include "mpiio.h"
+#include "pair.h"
 #include "special.h"
 #include "universe.h"
-#include "mpiio.h"
-#include "memory.h"
-#include "error.h"
-#include "utils.h"
-#include "fmt/format.h"
+#include "update.h"
+
+#include <cstring>
+#include <dirent.h>
 
 #include "lmprestart.h"
 
diff --git a/src/reader.cpp b/src/reader.cpp
index 2a6e4bf90c..8230fa3ed3 100644
--- a/src/reader.cpp
+++ b/src/reader.cpp
@@ -12,10 +12,10 @@
 ------------------------------------------------------------------------- */
 
 #include "reader.h"
-#include <cstring>
+
 #include "error.h"
-#include "utils.h"
-#include "fmt/format.h"
+
+#include <cstring>
 
 using namespace LAMMPS_NS;
 
diff --git a/src/reader_native.cpp b/src/reader_native.cpp
index 9b93c78000..8ebab4b349 100644
--- a/src/reader_native.cpp
+++ b/src/reader_native.cpp
@@ -12,13 +12,17 @@
 ------------------------------------------------------------------------- */
 
 #include "reader_native.h"
+
+#include "atom.h"
+#include "error.h"
+#include "memory.h"
+#include "tokenizer.h"
+#include "utils.h"
+
 #include <cstring>
 #include <cstdlib>
-#include "atom.h"
-#include "memory.h"
-#include "error.h"
-#include "utils.h"
-#include "tokenizer.h"
+#include <utility>
+#include <vector>
 
 using namespace LAMMPS_NS;
 
diff --git a/src/reader_native.h b/src/reader_native.h
index 6456dc275a..d1c8433016 100644
--- a/src/reader_native.h
+++ b/src/reader_native.h
@@ -23,9 +23,8 @@ ReaderStyle(native,ReaderNative)
 #define LMP_READER_NATIVE_H
 
 #include "reader.h"
-#include <string>
+
 #include <map>
-#include <vector>
 
 namespace LAMMPS_NS {
 
diff --git a/src/table_file_reader.cpp b/src/table_file_reader.cpp
index 525db24961..917aea7d49 100644
--- a/src/table_file_reader.cpp
+++ b/src/table_file_reader.cpp
@@ -15,14 +15,11 @@
    Contributing authors: Richard Berger (Temple U)
 ------------------------------------------------------------------------- */
 
-#include "lammps.h"
-#include "error.h"
 #include "table_file_reader.h"
-#include "utils.h"
-#include "tokenizer.h"
-#include "fmt/format.h"
 
-#include <cstring>
+#include "error.h"
+#include "text_file_reader.h"
+#include "tokenizer.h"
 
 using namespace LAMMPS_NS;