diff --git a/api/http/handler/edgestacks/edgestack_status_update.go b/api/http/handler/edgestacks/edgestack_status_update.go
index 53fdef1df..837a292a1 100644
--- a/api/http/handler/edgestacks/edgestack_status_update.go
+++ b/api/http/handler/edgestacks/edgestack_status_update.go
@@ -135,6 +135,11 @@ func (handler *Handler) updateEdgeStackStatus(tx dataservices.DataStoreTx, r *ht
 }
 
 func updateEnvStatus(environmentId portainer.EndpointID, stack *portainer.EdgeStack, deploymentStatus portainer.EdgeStackDeploymentStatus) {
+	if deploymentStatus.Type == portainer.EdgeStackStatusRemoved {
+		delete(stack.Status, environmentId)
+		return
+	}
+
 	environmentStatus, ok := stack.Status[environmentId]
 	if !ok {
 		environmentStatus = portainer.EdgeStackStatus{
diff --git a/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/DeploymentCounter.tsx b/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/DeploymentCounter.tsx
index c6ea944a4..2b09ea968 100644
--- a/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/DeploymentCounter.tsx
+++ b/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/DeploymentCounter.tsx
@@ -39,11 +39,13 @@ export function DeploymentCounter({
   total: number;
   type?: StatusType;
 }) {
+  const width = total ? (count / total) * 100 : 0;
+
   return (
     <TooltipWithChildren message={getTooltip(count, total, type)}>
       <div className="h-2 w-full overflow-hidden rounded-lg bg-gray-4">
         <div
-          style={{ width: `${(count / total) * 100}%` }}
+          style={{ width: `${width}%` }}
           className={clsx('h-full rounded-lg', {
             'bg-success-7': type === StatusType.Running,
             'bg-error-7': type === StatusType.Error,
diff --git a/pkg/libstack/compose/internal/composeplugin/status.go b/pkg/libstack/compose/internal/composeplugin/status.go
index 27cbd4fe9..47b903def 100644
--- a/pkg/libstack/compose/internal/composeplugin/status.go
+++ b/pkg/libstack/compose/internal/composeplugin/status.go
@@ -127,6 +127,12 @@ func (wrapper *PluginWrapper) WaitForStatus(ctx context.Context, name string, st
 				log.Debug().
 					Str("project_name", name).
 					Msg("no output from docker compose ps")
+
+				if status == libstack.StatusRemoved {
+					errorMessageCh <- ""
+					return
+				}
+
 				continue
 			}