code: public void cleanUp() {
      // Removing the entries from widgets.dat suffices. Opera will remove the other files.
      // These other files are:
      // widgets/xxx.oex
      // widgets/OEX_PATH_PREFIX/
      if (backupWidgetDat != null) {
        try {
          Files.move(backupWidgetDat, widgetsDat);
        } catch (IOException e) {
          throw new WebDriverException("Unable to restore widgets.dat");
        }
      } else {
        widgetsDat.delete();
      }
    }
docs: Remove all custom extensions