Các bước để nhân rộng:
Xenial Ubuntu 16.04 (x86-64)
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
Tôi muốn gỡ cài đặt nodejs
và npm
đã thấy một số bài đăng cho thấy đây là cách phổ biến nhất:
sudo apt-get purge --auto-remove nodejs
Tuy nhiên, điều này tạo ra một dấu nhắc dường như tham chiếu các phụ thuộc mà nếu chúng bị xóa, nghe có vẻ như chúng sẽ gây ra vấn đề.
Cách tốt nhất để "hoàn tác" cài đặt nodejs
và là npm
gì?
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
gyp* libboost-python1.58.0* libjs-inherits* libjs-node-uuid*
libjs-underscore* libssl-dev* libssl-doc* libuv1* libuv1-dev*
linux-headers-4.4.0-18* linux-headers-4.4.0-18-generic*
linux-headers-4.4.0-21* linux-headers-4.4.0-21-generic*
linux-image-4.4.0-18-generic* linux-image-4.4.0-21-generic*
linux-image-extra-4.4.0-18-generic* linux-image-extra-4.4.0-21-generic*
linux-signed-image-4.4.0-18-generic* linux-signed-image-4.4.0-21-generic*
node-abbrev* node-ansi* node-ansi-color-table* node-archy* node-async*
node-block-stream* node-combined-stream* node-cookie-jar*
node-delayed-stream* node-forever-agent* node-form-data* node-fstream*
node-fstream-ignore* node-github-url-from-git* node-glob* node-graceful-fs*
node-gyp* node-inherits* node-ini* node-json-stringify-safe* node-lockfile*
node-lru-cache* node-mime* node-minimatch* node-mkdirp* node-mute-stream*
node-node-uuid* node-nopt* node-normalize-package-data* node-npmlog*
node-once* node-osenv* node-qs* node-read* node-read-package-json*
node-request* node-retry* node-rimraf* node-semver* node-sha* node-sigmund*
node-slide* node-tar* node-tunnel-agent* node-underscore* node-which*
nodejs* nodejs-dev* npm* python-configobj* python-pycurl* python-pyexiv2*
python-pyexiv2-doc*
0 to upgrade, 0 to newly install, 72 to remove and 0 not to upgrade.
After this operation, 631 MB disk space will be freed.
Do you want to continue? [Y/n]
Biên tập:
Đây là đầu ra từ sudo apt-get purge nodejs
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gyp libboost-python1.58.0 libjs-inherits libjs-node-uuid libjs-underscore
libssl-dev libssl-doc libuv1 libuv1-dev linux-headers-4.4.0-18
linux-headers-4.4.0-18-generic linux-headers-4.4.0-21
linux-headers-4.4.0-21-generic linux-image-4.4.0-18-generic
linux-image-4.4.0-21-generic linux-image-extra-4.4.0-18-generic
linux-image-extra-4.4.0-21-generic linux-signed-image-4.4.0-18-generic
linux-signed-image-4.4.0-21-generic python-configobj python-pycurl
python-pyexiv2 python-pyexiv2-doc
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
node-abbrev* node-ansi* node-ansi-color-table* node-archy* node-async*
node-block-stream* node-combined-stream* node-cookie-jar*
node-delayed-stream* node-forever-agent* node-form-data* node-fstream*
node-fstream-ignore* node-github-url-from-git* node-glob* node-graceful-fs*
node-gyp* node-inherits* node-ini* node-json-stringify-safe* node-lockfile*
node-lru-cache* node-mime* node-minimatch* node-mkdirp* node-mute-stream*
node-node-uuid* node-nopt* node-normalize-package-data* node-npmlog*
node-once* node-osenv* node-qs* node-read* node-read-package-json*
node-request* node-retry* node-rimraf* node-semver* node-sha* node-sigmund*
node-slide* node-tar* node-tunnel-agent* node-underscore* node-which*
nodejs* nodejs-dev* npm*
0 to upgrade, 0 to newly install, 49 to remove and 0 not to upgrade.
After this operation, 27.6 MB disk space will be freed.
Do you want to continue? [Y/n]
autoremove
. Điều gì xảy ra khi bạn chỉ chạysudo apt-get purge nodejs
?