prune

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2026 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	All      bool // remove every tpd-managed resource regardless of liveness
	Volumes  bool // scope to volumes only
	Images   bool // scope to images only
	Networks bool // scope to the tpd service network only
	Force    bool // skip confirmation prompt
}

type Result

type Result struct {
	VolumesRemoved  []string
	ImagesRemoved   []string
	NetworksRemoved []string
	// Errors records every requested removal that failed; Run also returns a
	// non-nil error so the CLI exits nonzero even when the rest succeeded.
	Errors []error
}

func Run

func Run(ctx context.Context, opts Options) (Result, error)

Run prunes tpd-managed Docker resources (volumes, derived images, and the service network).

Default (no type flags): remove only catalog-unused resources — a volume is used if some resolvable profile declares it (tpd-mise if any profile exists, tpd-cache-<name> for any profile declaring caches.<name>); a tpd/packages:<hash> image is used if some resolvable profile's (base-image-id, merged-packages) hash matches. The service network is never in scope by default. --all removes every tpd-managed resource regardless of liveness; it does not imply network scope. A type flag (--volumes / --images / --networks) scopes to exactly the requested types; without any, volumes and images are pruned.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL