Skip to content

Add subcommand to cleanup images? #760

@Alexhuszagh

Description

@Alexhuszagh

Checklist

Describe your request

Currently, users have to be proficient with docker or podman to cleanup images, when we should be able to remove any installed images if desired from a cross subcommand.

For example:

cross remove-images

This would then filter for all images starting with ghcr.io/cross-rs, and rustembedded/cross, and then remove all the matching images. We could also accept a list of targets, or empty for all, to remove all matching targets. For the former, we would want to filter for those matching main or edge, to avoid removing local images.

For example:

cross remove-images aarch64-unknown-linux-gnu arm-unknown-linux-gnueabi mips-unknown-linux-gnu

We could probably at the same time provide a list-images subcommand, to list what images have been previously installed, using the same syntax.

$ cross list-images
aarch64-unknown-linux-gnu
arm-unknown-linux-gnueabi
mips-unknown-linux-gnu

Describe why this would be a good inclusion for cross

This would further simplify using cross as a "zero-setup" cross-compilation tool, and also avoid users having to manually cleanup numerous images or write a script to automatically remove all images to reduce the storage requirements of cross.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions