A stack exists in two parts:
The stack connection contains all of the information needed at locate and access the container. While the stack container contains all of the stack's data. Normally, these work together seamlessly and require no maintenance or attention.
There are, however, special situations where the stack's container or connection may require intervention, either together or separately.
The simplest task is to a delete a stack that you no longer want to use.
To delete a stack:
The stack's container will be erased and the stack's connection will be removed from the archive.
If access to the container is no longer valid, you will need to reconnect the container. This could happen if, say, the stack container was moved or its access key has expired and a new one has been issued.
Reconnecting the stack will update the stack container's location and credentials in the archive.
To reconnect a stack to its container:
If the updated stack container can be accessed and belongs to this archive, the stack's connection is updated.
If an archive's connection to a stack has been lost, then the stack won't appear in the archive's sidebar. Reconnecting the archive to an existing container requires a new connection be added, not just updated.
To reconnect a stack that is not in the archive's sidebar:
If the updated stack container can be accessed and belongs to this archive, a new connection to this stack is added back to the archive.
A perfect example of this situation occurs when an archive that was connected to multiple stacks is lost and later recovered using one of the stacks. The recovered archive is only connected to the stack used to restore it. The other stacks must be manually reconnected.
You can remove a stack's connection from the archive, without deleting or accessing its container.
To disconnect a stack:
The stack's connection will be removed from the archive and it will no longer appear in the sidebar.
The archive will no longer be connected to its stack and cannot use or access the stack container until it is reconnected (see above).
If the stack container still exists, it is your responsibility to dispose of it.
There's a potential danger in leaving a stack disconnected, if you intend to later reconnect it.
A stack's connection reserves record numbers in the archive which the stack is using, that the archive is not.
Without a stack connection, those records could be reassigned during later capture actions. These records will likely collide with those same records in the stack container. So if you leave a stack disconnected, capture new layers, and then reconnect the stack, you might encounter record collisions.
To rectify this, you will need to delete all of the offending layers in the stack and re-copy them from the archive, or at least replace all of the slices with errors.