Adobe Photoshop stores lots of temporary files on your Mac during editing, which can have side-effects. Here's how to clear them out in macOS.
Photoshop from Adobe Systems in San Jose, CA has been around for decades - almost as long as the Mac has been around.
First introduced in 1989, PhotoShop version 1.0 ran on black and white Macs, and later on early color Mac II series models. The original product shipped in a large box and was sold on 3.5-inch floppy diskettes.
Today Photoshop is generally software as a service via its Creative Cloud for the monthly subscription price of $10 per month, or as part of a larger collection of tools.
Once you download and install both Creative Cloud and Photoshop, you can run it on your Mac.
Cache buildup
Over time, as Photoshop runs, it stores temporary files on your Mac's drives to speed up performance. Photoshop caches some files to avoid redundant processing at runtime which takes CPU time and would otherwise slow down performance.
These files can build up on your Mac and take up extra disk space. From time to time it's a good idea to clear cached files from your Mac's drives.
Adobe provides a way to do this from within Photoshop, by selecting Edit, then Purge, then All from Photoshop's menu bar. You can also choose to clear Photoshop's caches individually from the other submenus in the same location.
Other Photoshop files
Unfortunately, as Photoshop's features have grown over the years, Adobe's installation footprint on the Mac has grown too. Between the Creative Cloud install, the Photoshop folder, and /Library/Application Support/Adobe, the installation now dumps around ten-thousand files onto your Mac.
This is outrageous, and Adobe needs to do something about it. By comparison, the original Photoshop 1.0 installation was a few hundred files at most.
You can clean up a few of these files yourself on your Mac if you know where to find them.
In /Library/Application Support/Adobe, you'll find hundreds of folders, and some of these contain files you don't really need and can safely remove. Just be aware that removing critical parts of the Photoshop install can render the app unusable - so be careful when deleting installed files.
In particular, in /Library/Application Support/Adobe/Adobe Photoshop 2023/AddOnModules/sensei_model_cache live several hundred versioned megabytes of cache files you can remove. Be sure to quit Photoshop first before removing any installed files.
In /Library/Application Support/Adobe/Adobe Photoshop 2023/CameraRaw live thousands of files you probably don't need. In particular, inside both the "Adobe Standard" and "Camera" folders are profiles for over a thousand models of Apple devices and third-party cameras.
Since you only really need the profiles for devices you will be actually using, you can safely remove the others, assuming you will never be using those devices in the immediate future.
Just below that in the "LensProfiles" folders are similar profiles for thousands of camera lens, which you can safely remove if you're not using them.
In the subfolders of "CEP" are versioned folders for extensions, panels, and fonts - stored by date. You can safely delete the older versioned folders if they haven't been used in many months.
As long as you're in /Library/Application Support/
If you don't use Apple's Garageband or Logic app, you may find folders for additional app support files for those apps within Application Support. If you don't need these apps, you can delete the two additional app support folders Apple installs for both - at a size of around 1GB each.
Photoshop scratch disks
Photoshop has its own virtual memory (VM) system which it uses at runtime to cache parts of ongoing work out to disk, all to conserve system RAM. These are called scratch disks.
You can turn scratch disks on and off in Photoshop's Preferences from its application menu in Preferences->Scratch Disks. Photoshop will only display drive volumes in this list which it thinks are suitable for VM use.
Also, if you select any of the listed volumes for use as scratch disks, make sure those volumes are on drives with fast performance. In general, you don't want to use any USB drives which are slow or are almost full.
Ideally, a good scratch disk will be on a Thunderbolt drive attached to your Mac, or on an attached RAID device, and contain nearly empty volumes. The more empty a volume is, the more free reign Photoshop has to use all of its capacity as VM - and the less time it has to spend searching a volume for empty blocks to use for VM I/O.
The ultimate Photoshop cleanup: reinstall
Although it's a time sink, ultimately the best way to clean up the Photoshop cache and extra files is to uninstall it, reinstall it, and then remove any excess files from a clean install. While this process is time-consuming and isn't generally required, it does ensure all excess unused Photoshop files get cleaned up.
To uninstall Photoshop, use Adobe's Creative Cloud app, then reinstall it the same way. Creative Cloud also usually installs a Finder alias to an Adobe app uninstaller in each installed app's folder.
You can follow these aliases to run the standalone Adobe uninstaller for each app. Creative Cloud also installs an alias to each installed app's uninstaller in /Utilities/Adobe Installers.
Other little Photoshop performance hacks
There are several other settings in Photoshop's Preferences that you can adjust to get even more performance out of the app. There are several network settings that can be disabled. Turning off Smart Quotes may also improve performance slightly.
If you're not using a trackpad, you can turn off Gestures, and in the same Tools pane turn off animations and zooming. You can turn off logging in the History & Content Credentials pane, too.
In the Performance pane, you can configure how much RAM Photoshop uses, and adjust other cache and history states such as how many recently opened documents Photoshop remembers.
There are additional performance settings in the Image Processing pane.
If you're not using a MacBook with a Touch Bar, you can turn this setting off in the Enhanced Controls pane.
Keeping your Photoshop installation caches clean and optimizing scratch disk space will speed up Photoshop and reduce the number and size of files stored on your Mac's local drive volumes.