Uninstall Flutter

To remove all of Flutter from your development machine, delete the directories that store Flutter and its configuration files.

Uninstall the Flutter SDK

#

Select your development platform from the following tabs.

This guide presumes that you installed Flutter in C:\user{username}dev on Windows.

To uninstall the SDK, remove the flutter directory.

C:\> Remove-Item -Recurse -Force -Path 'C:\user{username}dev'flutter'

Remove configuration and package directories

#

Flutter and Dart install additional directories in your home directory. These contain configuration files and package downloads. Each of the following procedures are optional.

Remove Flutter configuration files

#

If you don't want to preserve your Flutter configuration, remove the following directories from your home directory.

%APPDATA%'.flutter-devtools

To remove these directories, run the following command.

C:\> Remove-Item -Recurse -Force -Path $env:APPDATA'.flutter-devtools

Remove Dart configuration files

#

If you don't want to preserve your Dart configuration, remove the following directories from your home directory.

%LOCALAPPDATA%'.dartServer
%APPDATA%'.dart
%APPDATA%'.dart-tool

To remove these directories, run the following command.

C:\> Remove-Item -Recurse -Force -Path $env:LOCALAPPDATA'.dartServer,$env:APPDATA'.dart,$env:APPDATA'.dart-tool

Remove pub package files

#

If you don't want to preserve your pub packages, remove the .pub-cache directory from your home directory.

C:\> Remove-Item -Recurse -Force -Path $env:LOCALAPPDATA'Pub\Cache

Remove Flutter from your Windows Path variable

#

To remove Flutter commands from PowerShell, remove Flutter to the PATH environment variable.

  1. 按下快捷键 Windows + Pause

    如果你的键盘上没有 Pause 键,请尝试 Windows + Fn + B

    这将会显示 系统 > 系统信息 的窗口。

  2. 单击 高级系统设置 > 高级 > 环境变量…

    这将会显示 环境变量 的窗口。

  3. Under User variables for (username) section, look for the Path entry.

    1. Double-click on it.

      The Edit Environment Variable dialog displays.

    2. Click the %USERPROFILE%\dev\flutter\bin entry.

    3. Click Delete.

    4. Click OK three times.

  4. To enable these changes, close and reopen any existing command prompts and PowerShell instances.

This guide presumes that you installed Flutter in ~/development/ on macOS.

To uninstall the SDK, remove the flutter directory.

rm -rf ~/development/flutter

Remove configuration and package directories

#

Flutter and Dart install additional directories in your home directory. These contain configuration files and package downloads. Each of the following procedures are optional.

Remove Flutter configuration files

#

If you don't want to preserve your Flutter configuration, remove the following directories from your home directory.

~/.flutter
~/.flutter-devtools
~/.flutter_settings

To remove these directories, run the following command.

rm -rf  ~/.flutter*

Remove Dart configuration files

#

If you don't want to preserve your Dart configuration, remove the following directories from your home directory.

~/.dart
~/.dart-tool
~/.dartServer

To remove these directories, run the following command.

rm -rf  ~/.dart*

Remove pub package files

#

If you don't want to preserve your pub packages, remove the .pub-cache directory from your home directory.

rm -rf  ~/.pub-cache

Remove Flutter from your macOS PATH

#

To remove Flutter commands from PowerShell, remove Flutter to the PATH environment variable. This guide presumes your Mac runs the latest default shell, zsh. Zsh uses the .zshenv file for environment variables.

  1. Launch your preferred text editor.

  2. Open the Zsh environmental variable file ~/.zshenv

  3. Remove the following line at the end of your ~/.zshenv file.

    bash
    export PATH=$HOME/development/flutter/bin:$PATH
  4. Save your ~/.zshenv file.

  5. To apply this change, restart all open terminal sessions.

If you use another shell, check out this tutorial on removing a directory from your PATH.

This guide presumes that you installed Flutter in ~/development/ on Linux.

To uninstall the SDK, remove the flutter directory.

rm -rf ~/development/flutter

Remove configuration and package directories

#

Flutter and Dart install additional directories in your home directory. These contain configuration files and package downloads. Each of the following procedures are optional.

Remove Flutter configuration files

#

If you don't want to preserve your Flutter configuration, remove the following directories from your home directory.

~/.flutter
~/.flutter-devtools
~/.flutter_settings

To remove these directories, run the following command.

rm -rf  ~/.flutter*

Remove Dart configuration files

#

If you don't want to preserve your Dart configuration, remove the following directories from your home directory.

~/.dart
~/.dart-tool
~/.dartServer

To remove these directories, run the following command.

rm -rf  ~/.dart*

Remove pub package files

#

If you don't want to preserve your pub packages, remove the .pub-cache directory from your home directory.

rm -rf  ~/.pub-cache

This guide presumes that you installed Flutter in ~/development/ on ChromeOS.

To uninstall the SDK, remove the flutter directory.

rm -rf ~/development/flutter

Remove configuration and package directories

#

Flutter and Dart install additional directories in your home directory. These contain configuration files and package downloads. Each of the following procedures are optional.

Remove Flutter configuration files

#

If you don't want to preserve your Flutter configuration, remove the following directories from your home directory.

~/.flutter
~/.flutter-devtools
~/.flutter_settings

To remove these directories, run the following command.

rm -rf  ~/.flutter*

Remove Dart configuration files

#

If you don't want to preserve your Dart configuration, remove the following directories from your home directory.

~/.dart
~/.dart-tool
~/.dartServer

To remove these directories, run the following command.

rm -rf  ~/.dart*

Remove pub package files

#

If you don't want to preserve your pub packages, remove the .pub-cache directory from your home directory.

rm -rf  ~/.pub-cache

Reinstall Flutter

#