Отключить установку LXD по умолчанию с Ubuntu Server 16.04

Начиная с Ubuntu 16.04 LXD стал зависимостью в метапакете ubuntu-server. Следовательно, при обновлении и новой установке будет установлен LXD.

Это очень раздражающее поведение. Есть ли способ отключить это поведение? Не каждому производственному оборудованию требуется запуск службы контейнеров.

4
задан 6 June 2016 в 21:16

2 ответа

lxd рекомендуется ubuntu-server

root@c7:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:    16.04
Codename:   xenial

root@c7:~# apt-cache depends ubuntu-server|grep lxd
  Recommends: lxd

root@c7:~# apt-cache depends ubuntu-server|grep Recommends
  Recommends: lxd
  Recommends: snapd

, можно использовать

apt install --no-install-recommends ubuntu-server

, чтобы не устанавливать lxd и snapd или

apt remove --purge lxd snapd

для удаления их, не удаляя сервер человечности

root@c7:~# apt remove --purge lxd snapd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  lxd* snapd*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 37.4 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 25405 files and directories currently installed.)
Removing lxd (2.0.0-0ubuntu4) ...
Warning: Stopping lxd.service, but it can still be activated by:
  lxd.socket
Purging configuration files for lxd (2.0.0-0ubuntu4) ...
Failed to stop lxd.service: Unit lxd.service not loaded.
dpkg: warning: while removing lxd, directory '/var/lib/lxd' not empty so not removed
Removing snapd (2.0.3) ...
Purging configuration files for snapd (2.0.3) ...
Processing triggers for man-db (2.7.5-1) ...
6
ответ дан 6 June 2016 в 21:16

Я думаю, что Вы просто хотите отключить связанные сервисы, не удалить их. Так как они просто, другой обслуживает, мы можем отключить их использующий systemctl

sudo systemctl disable lxd
sudo systemctl disable snapd

, Если когда-нибудь Вы хотите запустить их.

sudo systemctl start lxd
sudo systemctl start snapd

Простой, как.

4
ответ дан 6 June 2016 в 21:16

Другие вопросы по тегам:

Похожие вопросы: