Where does OS X store your current desktop picture? I read somewhere else that it was in /Library/Caches/com.apple.Desktop. But I don't have that directory.
Starting in Lion, I don't think Lion caches desktop pictures anymore (possibly because you can have multiple at a time, for different desktops/spaces).
In that case, use
plutil -p to dump the binary plist file in text form using terminal:
plutil -p ~/Library/Preferences/com.apple.desktop.plist
The Apple delivered desktop images are stored in /Library/Desktop Pictures , so you can eliminate those (or seek those if you used an Apple picture for one or more spaces). Before Lion, the preference file that controls desktop images is text format any to find out the current image, open
~/Library/Preferences/com.apple.desktop.plist in a text editor and find the first
ImageFilePath property. That will tell you the path to the current desktop image.
In current versions of macOS (at least in Mojave, probably since Sierra, not sure about others) the location of the desktop pictures are stored in a SQLite database located at
I did not dig into details of the database structure but you can get the file paths with this command:
sqlite3 -readonly ~/Library/Application\ Support/Dock/desktoppicture.db 'SELECT * FROM data;'
If you just go into system preference, then desktop. you can simple click and drag the little image you have onto your desktop.
It does allow you to retrieve the image if that is what you want. Also once you drag it to your desktop you'll know the filename and then you can use Spotlight to search for the original copy, thus finding the location that you stored it in.