dart pub remove
Remove is one of the commands of the pub tool.
$ dart pub remove <package> [options]
This command removes the specified package from the pubspec as a dependency.
For example, the following command is equivalent to
editing pubspec.yaml
(removing http
from dependencies
or dev_dependencies
)
and then calling dart pub get
:
$ dart pub remove http
Options
For options that apply to all pub commands, see Global options.
--[no-]offline
預設情況下,pub 會從網路上拉取 package (--no-offline
)。若你想使用本地的 package,使用 --offline
引數。想了解更多細節,請檢視
離線獲取 package.
-n, --dry-run
Reports which dependencies would change, but doesn’t change any.
--[no-]precompile
By default, pub precompiles executables
in immediate dependencies (--precompile
).
To prevent precompilation, use --no-precompile
.