Remove app data on uninstall on mac in Electron js
Asked Answered
C

1

9

I have created an electron app and built it using electron-builder On app uninstall I need to delete the data that localStorage, kind of access tokens, etc.

In windows there is nsis - deleteAppDataOnUninstall: false , which is solving my issue, but i cant find any solution for mac

Cadge answered 5/9, 2019 at 17:2 Comment(1)
It's common on OSX for users to delete apps by simply dragging them to the trash rather than running an uninstaller program. You can keep track of the files your app is generating and offer an uninstaller that will delete them, but it's generally considered acceptable to leave behind a small amount of preferences data in ~/Library/Application Support.Redding
O
-2

If the question is asking how to make every Mac user's uninstallation automatically delete all associated files, I'm not sure.

But this answer might help developers.

I'm developing an Electron app on Mac and having trouble debugging it, and I needed a way to remove all of its associated files.

I just used https://freemacsoft.net/appcleaner for free, and it was helpful.

I have no affiliation to it. And I hesitate to download apps like that.

But I couldn't figure out another way.

I hope this answer helps.

Ovipositor answered 10/12, 2023 at 22:55 Comment(4)
any affiliation? /help/promotionSpinule
@Spinule I have no affiliation to it. And I hesitate to download apps like that. But I'm developing an Electron app and having trouble debugging it, and I couldn't figure out any other way to remove all of its associated files.Ovipositor
I wonder if this really addresses the question though. I interpreted it as asking for a way for the app to do that cleanup itself instead of having the user do it.Spinule
I recommend to make sure that your answer can be found on StackOverflow by asking a question it 100% matches and answers and then answer it. That way you do not suffer the disadvantages as from posting it here.Gronseth

© 2022 - 2024 — McMap. All rights reserved.