Recently I was playing around with an app that had a feature to assign a profile picture. What caught my attention was the fact, that the popup that allows to do so, shows all my profile pictures I used to have since macOS Mavericks in a section called Recents.
This section however does not appear when you try to change your profile picture through macOS System Preferences.
I was surprised that macOS still keeps my old profile pictures. I decided to locate the directory and bin all old pictures so only the current one would remain.
Press ⌘ + Space to open Spotlight and type Terminal or iTerm.
cd ~/Library/Containers/com.apple.ImageKit.RecentPictureService/Data/Library/Images/Recent\ Pictures
Open above path by typing
A Finder window should appear, containing all of the custom profile pictures you have ever assigned to your account. It also contains a Recents.plist file – an XML that contains some info about each image.
Identify the picture you want to keep and store it’s filename, which in this case is just an UUID with the file extension.
Open the XML file and delete each dict item that contains file name different that the one you want to keep. Save it.
Move all old profile pictures to Trash (along with the corresponding thumbnail). Empty the trash.