diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/InitIts.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/InitIts.java
index 1cd2b74..9fb2b3d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/InitIts.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/InitIts.java
@@ -21,7 +21,10 @@
 import com.google.gerrit.pgm.init.api.ConsoleUI;
 import com.google.gerrit.pgm.init.api.InitStep;
 import com.google.gerrit.pgm.init.api.Section;
+import com.google.gerrit.server.config.SitePaths;
+import com.google.inject.Inject;
 import java.io.IOException;
+import java.nio.file.Path;
 import java.util.EnumSet;
 import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.eclipse.jgit.lib.Config;
@@ -41,6 +44,8 @@
     ENFORCED
   }
 
+  @Inject private SitePaths sitePaths;
+
   private final String pluginName;
   private final String itsDisplayName;
   protected final ConsoleUI ui;
@@ -61,7 +66,18 @@
   }
 
   @Override
-  public void run() throws IOException, ConfigInvalidException {}
+  public void run() throws IOException, ConfigInvalidException {
+    Path deprecatedRules = sitePaths.etc_dir.normalize().resolve("its").resolve("action.config");
+    if (deprecatedRules.toFile().exists()) {
+      ui.error(
+          "Deprecated rules file '%s' (No trailing 's' in 'action') will not be read. "
+              + "Please migrate to 'etc/its/actions.config' (Trailing 's' in 'actions') and retry "
+              + "the init step.\n",
+          deprecatedRules);
+      throw new ConfigInvalidException(
+          "Deprecated configuration file found: " + deprecatedRules.toRealPath());
+    }
+  }
 
   @Override
   public void postRun() throws IOException, ConfigInvalidException {
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
index cd9c2b9..ee0c568 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBase.java
@@ -116,26 +116,6 @@
   private void reloadRules() {
     rules = Lists.newArrayList();
 
-    // Add rules from file with typo in filename
-    //
-    // While the documentation called for "actions.config" (Trailing "s" in
-    // "actions"), the code previously only loaded "action.config" (No
-    // trailing "s" in "action"). To give users time to gracefully migrate to
-    // "actions.config" (with trailing "s", we (for now) load files from both
-    // locations, but consider "actions.config" (with trailing "s" the
-    // canonical place.
-    File faultyNameRuleFile =
-        new File(
-            sitePath.toFile(),
-            "etc" + File.separatorChar + "its" + File.separator + "action.config");
-    if (faultyNameRuleFile.exists()) {
-      log.warn(
-          "Loading rules from deprecated 'etc/its/action.config' (No "
-              + "trailing 's' in 'action'). Please migrate to "
-              + "'etc/its/actions.config' (Trailing 's' in 'actions').");
-      addRulesFromFile(faultyNameRuleFile);
-    }
-
     // Add global rules
     File globalRuleFile = new File(sitePath.toFile(), ITS_CONFIG_FILE_START + ITS_CONFIG_FILE_END);
     addRulesFromFile(globalRuleFile);
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBaseTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBaseTest.java
index 80e12fb..371b9d5 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBaseTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/workflow/RuleBaseTest.java
@@ -48,7 +48,6 @@
   private enum RuleBaseKind {
     GLOBAL,
     ITS,
-    FAULTY
   }
 
   public void testWarnNonExistingRuleBase() {
@@ -221,41 +220,6 @@
     assertEquals("Matched actionRequests do not match", expected, actual);
   }
 
-  public void testWarnExistingFaultyNameRuleBaseFile() throws IOException {
-    injectRuleBase("", RuleBaseKind.FAULTY);
-
-    replayMocks();
-
-    createRuleBase();
-
-    assertLogMessageContains("Please migrate"); // Migration warning for old name
-    assertLogMessageContains("Neither global"); // For rule file at at usual places
-  }
-
-  public void testSimpleFaultyNameRuleBase() throws IOException {
-    injectRuleBase(
-        "[rule \"rule1\"]\n" + "\tconditionA = value1\n" + "\taction = action1",
-        RuleBaseKind.FAULTY);
-
-    Rule rule1 = createMock(Rule.class);
-    expect(ruleFactory.create("rule1")).andReturn(rule1);
-
-    Condition condition1 = createMock(Condition.class);
-    expect(conditionFactory.create("conditionA", "value1")).andReturn(condition1);
-    rule1.addCondition(condition1);
-
-    ActionRequest actionRequest1 = createMock(ActionRequest.class);
-    expect(actionRequestFactory.create("action1")).andReturn(actionRequest1);
-    rule1.addActionRequest(actionRequest1);
-
-    replayMocks();
-
-    createRuleBase();
-
-    assertLogMessageContains("Please migrate"); // Migration warning for old name
-    assertLogMessageContains("Neither global"); // For rule file at at usual places
-  }
-
   public void testSimpleItsRuleBase() throws IOException {
     injectRuleBase(
         "[rule \"rule1\"]\n" + "\tconditionA = value1\n" + "\taction = action1", RuleBaseKind.ITS);
@@ -277,25 +241,12 @@
   }
 
   public void testAllRuleBaseFilesAreLoaded() throws IOException {
-    injectRuleBase("[rule \"rule1\"]\n" + "\taction = action1", RuleBaseKind.FAULTY);
-
     injectRuleBase("[rule \"rule2\"]\n" + "\taction = action2", RuleBaseKind.GLOBAL);
 
     injectRuleBase("[rule \"rule3\"]\n" + "\taction = action3", RuleBaseKind.ITS);
 
     Collection<Property> properties = Collections.emptySet();
 
-    Rule rule1 = createMock(Rule.class);
-    expect(ruleFactory.create("rule1")).andReturn(rule1);
-
-    ActionRequest actionRequest1 = createMock(ActionRequest.class);
-    expect(actionRequestFactory.create("action1")).andReturn(actionRequest1);
-    rule1.addActionRequest(actionRequest1);
-
-    List<ActionRequest> rule1Match = Lists.newArrayListWithCapacity(1);
-    rule1Match.add(actionRequest1);
-    expect(rule1.actionRequestsFor(properties)).andReturn(rule1Match);
-
     Rule rule2 = createMock(Rule.class);
     expect(ruleFactory.create("rule2")).andReturn(rule2);
 
@@ -325,13 +276,10 @@
     Collection<ActionRequest> actual = ruleBase.actionRequestsFor(properties);
 
     List<ActionRequest> expected = Lists.newArrayListWithCapacity(3);
-    expected.add(actionRequest1);
     expected.add(actionRequest2);
     expected.add(actionRequest3);
 
     assertEquals("Matched actionRequests do not match", expected, actual);
-
-    assertLogMessageContains("Please migrate"); // Migration warning for old name
   }
 
   private RuleBase createRuleBase() {
@@ -351,9 +299,6 @@
       case ITS:
         baseName = "actions-ItsTestName";
         break;
-      case FAULTY:
-        baseName = "action";
-        break;
       default:
         fail("Unknown ruleBaseKind");
     }
