[Koha] Storage of Perl Scripts [Was: Orphaned Authority Records: Finding Them and Deleting Them]

Alvaro Cornejo cornejo.alvaro at gmail.com
Wed Aug 5 14:01:31 NZST 2020

Hi Charles

You can use "locate" command to find files in linux

#sudo updatedb (Updates locate index)
#sudlo locate  remove_unused_authorities.pl

the script mentioned is in


For running you can go to that dir and do:

 # sudo koha-shell YOURLIBRARY_INSTANCE
This will change user environment to your koha user/instance

# ./remove_unused_authorities.pl --test | grep -i delete
(note the dot at the beginning if the string)
The grep command helps you filter only the ones that can be deleted instead
of all the authorities.

  # ./remove_unused_authorities.pl --test | grep -i delete >
This will write all found records to file  /PathToAFIle/filename. You
should have write privileges on destination folder for your kohaUser so you
can try /temp/orphanauthors.txt

You can also just do:

 # ./remove_unused_authorities.pl
to see what options the command has like delete orphaned records and check
only certain types of authorities.

At the end type "exit" to return to your normal linux user.

Note that the script is CPU consuming.

Hope helps



 Stay safe / Cuídate/  Reste sécurisé
*7* Switch off as you go / Apaga lo que no usas /  Débranchez au fur et à
 *q *Recycle always / Recicla siempre / Recyclez toujours
 P Print only if absolutely necessary / Imprime solo si es necesario /
Imprimez seulement si nécessaire

Le mar. 4 août 2020 à 20:44, Charles Kelley <cmkelleymls at gmail.com> a
écrit :

> Hello, all!
>     In a recent exchange, on 5 Aug. 2020, at 12:54 AM, I received the
> following response to my earlier inquiry about orphaned authority records:
> Did you try the script misc/migration_tools/remove_unused_authorities.pl?
> >
>     I have looked for this on our Linux box, but I cannot find it. In fact,
> I cannot find any Perl script. Where are they kept? The Koha-Community.org
> website has not been helpful to me in this regard.
>     Thank you for your help in this matter.
>     P. S. We are running Koha 20.05 on Debian 10.4 ("Stretch").
> --
>     気を付けて。 /ki wo tukete/ = Take care.
>     -- Charles.
>     Charles Kelley, MLS
>     PSC 704 Box 1029
>     APO AP 96338
>     Charles Kelley
>     Tsukimino 1-Chome 5-2
>     Tsukimino Gaadenia #210
>     Yamato-shi, Kanagawa-ken
>     〒242-0002 JAPAN
>     +1-301-741-7122 [US cell]
>     +81-80-4356-2178 [JPN cell]
>     mnogojazyk at aol.com [h]
>     cmkelleymls at gmail.com [p]
>     linkedin.com/in/cmkelleymls <http://www.linkedin.com/in/cmkelleymls>
>     Meeting Your Information Needs. Virtually.
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha

More information about the Koha mailing list