Can we delete Photoshop preferences on upgradation or deletion of plugin?

Hi all,
Is there any way to delete Photoshop preferences on upgradation or deletion of plugin in UXP?

Or can we enable “Reset Preferences On Quit” via UXP? I have attached the file for reference.


Why would you do that? For some users that could be a few hours o wasted time to get preferences back.

Hi @Jarda , Some of our users are facing issue when they update plugin from older version to newer version. New plugin version inherits the problematic preference that’s why I want to clear the preference of Photoshop when someone updates the plugin.

Can we delete the preferences of Photoshop via UXP?

This setting does not delete just plugin preferences, which you should handle yourself in your plugin upgrade. This setting deletes all Ps preferences - theme, workspaces, tools settings… Everything. That’s what @Jarda is saying. Not sure about brushes, actions and similar things though. In any case, this MUST NOT be used for your use case - you must fix this in your plugin. If there’s really no way to make upgrade backwards compatible, it should go as a separate plugin IMO

Alchemist has version number in preferences and if the major version is different then all preferences are reset from initial state object. (just an example)

1 Like

Can we delete only plugin preferences from the Photoshop? If yes, then how?

It very much depends on where and how you store plugin preferences. Photoshop itself doesn’t really know much about your plugin in that regard, it only gives you some places you can access without consent and that’s basically it.

Personally, I do not store plugin preferences anywhere. Does Photoshop store plugin preferences by default? If yes, then where and how can I delete it?

This begs a question. What kind of preferences are we talking about? As I mentioned, Ps has no idea what your plugin does or what preferences it has. Probably the only thing Ps knows about it, is panels positions.

So what exactly this problematic preference is?

The plugin made some change on the active document. But for few users, when they update the plugin from lower version to upper version, the plugin does not work properly. When user clear Photoshop preferences or reinstall the Photoshop again then only newer version of plugin work properly.

And I am unable to reproduce the issue at my machine that’s why I wanted to clear the preferences.

I’m almost out of ideas. I only can ask questions :thinking:

  • Does your plugin depend on some Ps preferences maybe?
  • Does the issue appear only when you upgrade to a specific version or to any version from lower?
  • Did you go through the changes you made for your plugin between the problematic versions?
1 Like

Personally speaking, if a plugin deleted my preferences I’d be demanding a refund. If I was warned that the plugin did this prior to installation I wouldn’t purchase/install it.

It seems super unlikely to me that PS settings are causing a problem.


Worth noting that if your plugin writes any data to the plugin data folder it is not deleted when a plugin is uninstalled.
I write my plugin settings there and that tripped me up when a new release tried to access the old release’s settings file.

1 Like

Thanks @Karmalakas The issue was related to some previous changes.

The following can be used to access the default data folder for a plugin:

const dataFolder = await require('uxp').storage.localFileSystem.getDataFolder();

If that’s where you are storing a plugin’s user-specfic data, it should be possible to loop through and delete all the files stored there without disturbing other Photoshop preferences.

1 Like