I was recently needing a way to clear all overrides in a 100+ page book. The book was divided into many separate stories, so it was not possible to simply “select all” and click on the “Clear overrides” button.

Instead of going through each story in turn, selecting all the text there, clearing overrides, and repeating that for each story in the document, I wrote a quick script.

(In fact, if it is necessary to clear all local overrides in footnotes it can be even more time-consuming, as there is no way to select all footnotes in one go. Rather, it would be necessary to clear the overrides one footnote at a time – although if the footnotes have a paragraph style applied then there is a shortcut for doing this.)

The script below will clear all paragraph-level and character-level overrides in the active InDesign document.

To use, simply copy the script into your favorite text editor, save with a .jsx extension, and place into your InDesign Scripts folder.

// Clear All Overrides
// Written by TAW. (c) 2014 by Bookraft Solutions, Israel (Id-Extras.com)
// Please do not delete this copyright notice.

var myOverrideType = OverrideType.ALL;
// var myOverrideType = OverrideType.CHARACTER_ONLY;
// var myOverrideType = OverrideType.PARAGRAPH_ONLY;

var allStories = app.activeDocument.stories.everyItem();

// Remove overrides from all stories
catch (e){alert ("No stories!")}

// Remove overrides from all footnotes
catch (e){alert ("No footnotes!")}

// Remove overrides from all table
catch (e){alert ("No tables!")}

alert("Overrides cleared!");

As is, the script will clear all overrides throughout the document from all text, including all text in tables and footnotes. It will clear paragraph-level overrides as well as character-level overrides.

However, it is easy enough to modify the script to suit your needs.

First of all, if you need to clear only paragraph-level overrides, or only character-level overrides, simply comment out the relevant line: Of lines 7, 8, and 9, exactly two should be commented out. (I may add a UI if I get the chance.)

Then, if you do not need to delete overrides from tables, footnotes, or regular text, comment out the appropriate lines there too. It should be self-evident how to do this, but if you have a question, leave a comment below.