Skip to content

chore(apps): clean up unreferenced app archives, packages and runtime rows #654

Backlog

Description

@RentnerKev

Problem

App data on disk and in the platform database only grows.

  • Downloaded archives (archives/<sha256>), unpacked packages, receipts and generation lock files are never removed. The only cleanup is clean_workspaces for abandoned workspaces (core/src/app_install/filesystem.rs:141-170). Every installed version stays on disk.
  • app_runtime_generations, app_runtime_operations, app_runtime_operation_requests and app_runtime_installations have no delete path. Only open operations are bounded (maxPendingPerInstallation = 100, web/src/server/AppRuntime/operations.server.ts:69).
  • Already bounded: app_runtime_messages (30 days / 10,000 rows, messages.server.ts:18-19) and app_runtime_events (event-log.server.ts:41-70).

Proposal

  • After an update, discard or purge, remove archives and packages no slot references any more.
  • Add retention for finished operations, operation receipts and retired generations, matching the existing message and event retention.
  • Remove stale generation lock files on stop.

Acceptance

  • Test: install 1.0.0, update to 1.1.0, discard previous: the 1.0.0 archive and package are gone; the active release is untouched.
  • Test: retention deletes only finished rows older than the limit.

Found in the app platform audit of 2026-11-30.

Activity

  1. added
    enhancement
    area: runtime
    area: database
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: databasearea: runtimeenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions