3

I have developed a small electron app and stored some cache files inside my ~/.config/electron-app. Now I need to remove the ~/.config/electron-app if the app is getting uninstalled. Is there any electron app uninstall event is available?

Many thanks...!

Gokulakannan T
  • 586
  • 4
  • 14
  • What is your build target/ target platform? The answer may be different for different targets. – Rhayene Feb 20 '19 at 16:36
  • Obviously, My platform is Linux (Ubuntu 16.04) – Gokulakannan T Feb 21 '19 at 06:06
  • There is more than one target viable for Ubuntu. [electron-builder targets](https://www.electron.build/configuration/linux) – Rhayene Feb 21 '19 at 10:23
  • @GokulakannanT Did you get any solution? My target is rpm and deb. – MANISH MOHAN Sep 02 '20 at 08:08
  • @MANISHMOHAN Short answer is no. My primary target was windows(nsis). For that, we have an option called `deleteAppDataOnUninstall`. If we set it as true, the cached AppData files were removed when the app is getting uninstalled. But I can't do it the same for deb. I guess, there are no such options for any Linux based targets. – Gokulakannan T Sep 02 '20 at 08:40
  • @GokulakannanT I found a way to do this. electron builder gives an option for a script to be run after uninstall. I have written there to remove the app folder itself. btw the option is known as "--after-remove" – MANISH MOHAN Sep 02 '20 at 15:23
  • Thank you @MANISHMOHAN. It will definitely helpful for someone. – Gokulakannan T Sep 03 '20 at 16:31

0 Answers0