Remove attachments

When managing attachments, you can remove files in the following ways:

  • In an edit session
  • From the attachment table
  • Using a geoprocessing tool

Tip:

To export attachments before using the Remove Attachments tool, use the Export Attachments geoprocessing tool to download attachments to a selected output location to archive the attachment files.

Remove attachments in an edit session

One or more files can be removed as attachments while editing a dataset.

Removing several attachments during an editing session may be all that is needed for some workflows and organizations. Keep the following in mind when removing attachments while editing:

  • Removing multiple attachments can only be done one feature or row at a time during an edit session in the Attribute pane.
  • The manual editing process can take significant time when removing many attachments.

To view the steps to remove attachments while editing, see Add or remove file attachments.

Remove attachments from the associated ATTACH table

All attachments can be removed in an edit session or by creating a match table to remove all files, but both options involve several steps. If you have editing privileges on the enabled for attachments feature class or table, you can quickly remove all attachments from the ATTACH table by completing the following steps:

  1. In the Catalog pane, right-click the ATTACH table and choose Open Table.
    Context menu from the Catalog pane showing the Open Table option
  2. On the Table tab, in the Selection group, click the All button to select all records.
    Table tab with the All button highlighted in the Selection group
  3. With all records selected, click the Delete button on the table menu.
    ATTACH table with all records selected and the Delete button highlighted
  4. On the Table tab, in the Manage Edits group, click the Save button.
    Table tab with the Save and Discard buttons highlighted in the Manage Edits group

Use the Remove Attachments geoprocessing tool

The Remove Attachments geoprocessing tool removes attachments identified by object IDs and file names in a required match table. This tool is best for workflows in which manually removing attachments in an edit session would be laborious to remove files from features or rows.

Keep the following in mind when using the Remove Attachments tool:

  • The tool can be used with enabled feature classes, feature layers, or stand-alone tables.
  • A match table is required to remove attachments from their applicable features. It is recommended that you use the Generate Attachment Match Table geoprocessing tool to create the required match table.
  • The tool does not honor selected dataset features. Instead, it deletes only the file names listed in the specified match table from their respective object IDs.
  • Specific attachments can be removed from one or more features in a feature class or rows in a table.
  • Custom or multiple match tables can be combined into a single match table to meet the required match table parameter input.

To remove attachments from an existing dataset, complete the following steps:

  1. On the Analysis tab. in the Geoprocessing group, click Tools, and search for or browse to the Remove Attachments tool in the Data Management Tools toolset.
    Remove Attachments search result in the Geoprocessing pane
  2. Click the Remove Attachments search result to open the tool.

    The Remove Attachments tool opens with its default parameters.

    Remove Attachments tool pane
  3. For Input Dataset, use the browse button Browse to select a feature class or table or click the down arrow to choose a dataset from the active map.
  4. For Input Join Field, choose a field from the input dataset with matching values in the match table.

    This field is the OBJECTID field if you created the match table using the Generate Attachment Match Table tool.

  5. For Match Table, choose the match table that contains the object IDs and file names that will remove attachments.
  6. For Match Join Field, choose the field in the match table with the match Object ID values.

    If you used the Generate Attachment Match Table tool to create the match table, this is the MatchID column.

  7. For Match Name Field, choose the file name field in the match table.
  8. Click Run to remove attachments.

Remove attachments by selection using a sample tool

You can also remove attachments using a sample tool that allows attachments to be removed by selection. With this method, no match table is needed. You can remove attachments to one or more selected features in a feature class in an active map. All attachments are removed for each selected feature. To remove specific attachments from a feature, you must use one of the methods above.

Learn more about how to remove attachments by selection

After removing attachments, you can add new attachments, or disable the dataset if attachments are no longer needed.

Related topics