2626#include " cuttlefish/flag_parser/flag.h"
2727#include " cuttlefish/host/commands/cvd/cli/command_request.h"
2828#include " cuttlefish/host/commands/cvd/cli/commands/command_handler.h"
29+ #include " cuttlefish/host/commands/cvd/cli/help_format.h"
2930#include " cuttlefish/host/commands/cvd/cli/selector/selector.h"
3031#include " cuttlefish/host/commands/cvd/cli/types.h"
3132#include " cuttlefish/host/commands/cvd/cli/utils.h"
@@ -43,15 +44,27 @@ cvd_common::Args RemoveCvdCommandHandler::CmdList() const {
4344}
4445
4546std::string RemoveCvdCommandHandler::SummaryHelp () const {
46- return " Remove devices and artifacts from the system." ;
47+ return " Remove instance groups and related artifacts from the system." ;
4748}
4849
49- Result<std::string> RemoveCvdCommandHandler::DetailedHelp (
50- const CommandRequest& request) {
51- return " Removes selected devices from the system.\n\n "
52- " Running devices are stopped first. Deletes build and runtime "
53- " artifacts, including log files and images (only if downloaded by "
54- " cvd itself)" ;
50+ std::vector<HelpParagraph> RemoveCvdCommandHandler::Description () const {
51+ return {
52+ HelpParagraph (
53+ " Removal consists of deleting the group's runtime directory (which "
54+ " includes log files and virtual disks), and removing the group "
55+ " from the CVD instance database. This operation completely removes "
56+ " any trace of the group from the system and cannot be undone." ),
57+ HelpParagraph (
58+ " The `cvd remove` command operates on entire instance groups. Even "
59+ " if you target a specific instance using selector flags (e.g., "
60+ " `--instance_name`), the entire group containing that instance will "
61+ " be removed." ),
62+ HelpParagraph (
63+ " If the selected instance group is running, the command will attempt "
64+ " to stop it first. If the instances cannot be stopped, the removal "
65+ " will fail. In this case, you may need to run `cvd reset` to "
66+ " clean up the system." ),
67+ };
5568}
5669
5770bool RemoveCvdCommandHandler::RequiresDeviceExists () const { return true ; }
0 commit comments