Skip to main content

teams cache remove

Removes the Microsoft Teams client cache

Usage

m365 teams cache remove [options]

Options

-c, --client

Teams client to target. Possible values are: new or classic. Default value is new.

-f, --force

Don't prompt for confirmation

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

This command will execute the following steps.

  • Stop the Microsoft Teams client. This will kill all the running Teams.exe tasks.

  • Clear the Microsoft Teams cached files. For Windows it will delete all files and folders in the %appdata%\Microsoft\Teams directory. For macOS it will delete all files and folders in the ~/Library/Application Support/Microsoft/Teams directory.

info
  • You won't lose any user data by clearing the cache.

  • Restarting Teams after you clear the cache might take longer than usual because the Teams cache files have to be rebuilt.

If you run the command in the CLI Docker container, you will get the following error message:

Because you're running CLI for Microsoft 365 in a Docker container, we can't clear the cache on your host. Instead run this command on your host using 'npx ...'.

The command works only on Windows and macOS. If you run it on a different operating system, you will get the 'abc' platform is unsupported for this command error.

Examples

Removes the Microsoft Teams client cache for the new client.

m365 teams cache remove

Removes the Microsoft Teams client cache for the classic client.

m365 teams cache remove --client classic

Response

The command won't return a response on success.

More information

CTRL + M