For a variety of reasons, my Papers2 library folder (~/Library/Application Support/Papers2
) was cluttered with many duplicate papers, generally only one of which was linked to a document in Papers2. Here is how I cleaned it up.
- From a Terminal,
cd ~/Library/Application\ Support
. open .
- Copy the
Papers2
folder to the Desktop. This is your backup. - In Papers2,
cmd+,
, select Library, select Add next to "Rename files in library folder as:", and select Separator -> _ then click Apply. - Back in your Terminal,
find ./ -iregex ".*[^_]\.pdf" -delete
- If you want to see what's going to be deleted before doing it, run
find ./ -iregex ".*[^_]\.pdf"
- If you want to see what's going to be deleted before doing it, run
- Back in Papers2, remove the _ from "Rename files in library folder as:", and click Apply again.
And thats it.
Thanks for your post. I have tried your solution but Papers2 does not rename the files in the library folder. Have you encounter this issue by any chance?