How to distinguish between new installation and an upgrade for user onboarding?

Hello,
We would like to create new features onboarding experience specifically targeting users who already know our add-on. Therefore, we need to distinguish between installing the app for the first time and upgrading of previously installed app.
Any ideas on how to check if it is an upgrade or new installation will be much appreciated.