Osy#betaRun it on Osyrin: osyrin.com

Reference / Local

Removing an app from a local platform

osy remove [app] [--path <project>] [--devname <name> | --test-platform | --server <url>] [--force] [--json]

Takes one app, and its databases, off a local platform that is running on this computer — a scratch app a script compiled, a repro, an experiment — and leaves the platform and its other apps as they are.

stablelocalcli

Summary#

Removes one app from a local platform: its databases are dropped and it is no longer listed. The platform keeps running, and every other app on it is untouched. To throw a whole local platform away instead, use Stopping the local platform with --delete.

Signature#

osy remove [app] [--path <project>] [--devname <name> | --test-platform | --server <url>] [--force] [--json]

Description#

  • app names the app by its name or its slug (WorkTrackerMigrations4242 or worktrackermigrations4242). Left out, it is the app of the project in --path (the current directory by default).
  • The platform is this project's, or the one --devname names (OSY_DEVNAME works too), or the shared test platform with --test-platform, or the one listening at --server. Name it one way, not two.
  • It asks before removing anything; --force does not ask. With --json and no --force it refuses rather than ask.

A final backup first. The app is deleted the same way osyrin app delete deletes one on a hosted platform: the platform takes a final backup of its databases into its own folder, under backups (osy instances shows where the platform is). Only when that backup has finished, with its archive and checksum recorded, are the databases dropped and the app marked deleted. If the backup cannot be taken (for example, pg_dump is not installed or is older than the database server), the deletion is held, nothing is deleted, and the command says why.

Local only. It acts only on a platform running on this computer, found among the ones osy instances --running lists. A --server that is not this computer is refused, and so is a loopback address that no local platform is listening on — a port forwarded to a hosted platform answers on loopback too. An app on a hosted platform is deleted with osyrin app delete. The platform's own apps (Admin and the platform's state) are never removed.

The platform must be running: it is not started to remove an app from it. Start it with osy compile in its project, or osyrin dev, and run the command again.

Examples#

osy remove                                              # this project's app, from this project's platform
osy remove WorkTrackerMigrations4242 --devname shared --force   # a scratch app on a named platform

See also#

Stopping the local platform — stop a local platform, or delete the whole instance with --delete.

Listing your local platforms — the local platforms on this computer, and which are running.

Reclaiming the disk your local platforms use — delete the instances you are no longer using.

Compiling your app — compile your source into an app on the local platform.

Related

Stopping the local platform

Stops the local platform serving your project — the one the build-and-test loop starts on demand. Its database stops…

Listing your local platforms

Lists every local platform on this machine and says which are still running. The build-and-test loop starts one per…

Reclaiming the disk your local platforms use

Each local platform carries its own database, so they add up fast. This deletes the ones you are no longer using —…

Compiling your app

Compiles your app's source into the app on the local platform — the inner-loop compile-and-apply. It applies additive…