code: public void removeModules(List<String> modules) throws Exception {
          long startTime = System.currentTimeMillis();
          Exception exception = null;
          if (!cfg.exists()) {
              init();
          }
          userDir = new File(System.getProperty("user.dir")).getAbsolutePath();
          System.setProperty("user.dir", options.getExecutionDirectory().getAbsolutePath());
          try {
              ConfigurationManager manager = new ConfigurationManager(cfg, false);
  
              ProjectConfigurationProvider cfgProvider = manager.getProjectConfigurationProvider();
              cfgProvider.removeModules(modules);
          } catch (Exception e) {
              exception = e;
          } finally {
              System.setProperty("user.dir", userDir);
              updateMsg(startTime, exception);
          }
      }
docs: Removes the module list from the configuration file
  
  @param modules
  Module names to remove
  @throws Exception
  if the walkmod configuration file can't be read.