<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Gwen,<br>
<br>
A while back I wrote a plugin intended to help folks identify and, if desired, delete these types of orphaned records.  You can find the plugin here: 
<a href="https://github.com/archivesspace-plugins/orphan_finder_job">https://github.com/archivesspace-plugins/orphan_finder_job</a><o:p></o:p></p>
<p class="MsoNormal"><br>
Note that there are two different versions depending on what version of ArchivesSpace you are running (2.6 or later vs. versions earlier than 2.6).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As always, test on a backup of your data and don’t run in production unless you’re certain it’s behaving as you want.  Feedback welcome!<br>
<br>
Lora<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Gwenlyn Coddington <gcoddington@mcdaniel.edu><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Thursday, January 2, 2020 at 11:02 AM<br>
<b>To: </b>"archivesspace_users_group@lyralists.lyrasis.org" <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>[Archivesspace_Users_Group] Batch Identifying and Deleting Select Agent Records<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Hello, <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I’m hoping someone out there might be able to share some thoughts on how to batch delete select Agent records. When we imported our records from Archon to ArchivesSpace, the migration created many Agent records with no links to any Accession
 or Resource records. I would like to a) identify all the Agent records with no Resource/Accession records linked to them and b) batch delete, or at least unpublish, only those records. Has anyone undergone a similar process? Any help or advice on the matter
 would be greatly appreciated. <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks, <o:p></o:p></p>
<p class="MsoNormal">Gwen Coddington <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><b>Gwenlyn Coddington</b><o:p></o:p></p>
<p class="MsoNormal"><i>College Archivist & Special Collections Librarian</i><o:p></o:p></p>
<p class="MsoNormal"><i>McDaniel Hoover Library</i><o:p></o:p></p>
<p class="MsoNormal"><a href="mailto:gcoddington@mcdaniel.edu">gcoddington@mcdaniel.edu</a><o:p></o:p></p>
<p class="MsoNormal">(410) 857-2793<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</body>
</html>