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.
-
按下快捷鍵 Windows + Pause。
如果你的鍵盤上沒有 Pause 鍵,請嘗試 Windows + Fn + B。
這將會顯示 系統 > 系統訊息 的視窗。
-
單擊 高階系統設定 > 高階 > 環境變數…
這將會顯示 環境變數 的視窗。
-
Under User variables for (username) section, look for the Path entry.
-
Double-click on it.
The Edit Environment Variable dialog displays.
-
Click the %USERPROFILE%\dev\flutter\bin entry.
-
Click Delete.
-
Click OK three times.
-
-
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.
-
Launch your preferred text editor.
-
Open the Zsh environmental variable file
~/.zshenv
-
Remove the following line at the end of your
~/.zshenv
file.export PATH=$HOME/development/flutter/bin:$PATH
-
Save your
~/.zshenv
file. -
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
You can reinstall Flutter at any time. If you removed the configuration directories, reinstalling Flutter restores them to default settings.