Should deleting a Package also delete the Application

I was experimenting with the Package functionality, with the intent to move an application from one sandbox (DEV) to another (TEST).

I created a new Package for the Application, then decided I did not want to move the application right now.

I then deleted the Package, and what happened was that the Application itself was deleted from the sandbox.

I am surprised this happened, as I thought the Package functionality was a way of moving applications between sandboxes or between tenants. I don’t see why it should delete the actual application from the tenant.

Hi Howard,

How did you get the application at first place ? Did you install it via package installation or manaully created?
If you have created it manually and generated a package , deleting the generated package would not delete your application.
But if you have got this application via package installation then deleting the package would delete the application as well since the source of the application is package.
In short the application will be deleted if the source package is deleted. So please cross check if you have deleted source package or not.

With Regards
Rohit R Rao

Hi Rohit,

The application did get into this tenant via the upload of a package.

However, the same application exists in a new package as well. So I was surprised that the application was going to be deleted when it was referenced in 2 different packages.

So I guess we will need to keep this original package around forever. That is fine, just wondered about the behavior.

Because we moved a package from a Test tenant into a Dev tenant, we needed to install the package as “unlocked”, so we could do further development.

That is why we created a new package that was “locked” for moving from Dev to Test.

So we were required to do it in this manner in our situation.

I just thought that if an application was referenced in 2 packages, it would not be deleted if 1 of the packages was deleted.