How to remove cloud-init from Ubuntu Server 20.04

Post a Comment
Cloud-init package is annoying for me because I am not using any cloud technology on my Ubuntu 20.04 server. Installed by default since Ubuntu server 18.04, and now on Ubuntu server 20.04 LTS. Here is how I remove the cloud-init package and the annoying notifications on every reboot.

According to Ubuntu official documentation, cloud-init is the Ubuntu package that handles early initialization of a cloud instance. It is also says that cloud-init can configure several things on the machine like default locale, hostname, private keys, etc. So I think it is save to remove it, since I am not using the server on cloud.
How to remove cloud-init from Ubuntu Server 20.04
Cloud Init annoying notifications

How to remove cloud-init from Ubuntu Server 20.04

There are three methods that actually works for me:
Method 1: Disable cloud-init from file
This is the safest and the easiest method.We only need to create cloud-init.disabled file in /etc/cloud directory and reboot the system.
  • To create empty file, issue this comand:
touch /etc/cloud/cloud-init.disabled
  • and reboot:
init 6

Method 2: Disable cloud-init from Grub Bootloader
This method is also easy, but not safe. A mistype in default GRUB file for example, could make you unable to boot your Ubuntu Server. So make sure you don't do any mistakes ^_^
  • Edit /etc/default/grub file
nano /etc/default/grub
  • Find GRUB_CMDLINE_LINUX, add cloud-init=disabled parameter
How to remove cloud-init from Ubuntu Server 20.04
Disable cloud-init from Grub Bootloader

  • Update GRUB configuration and reboot
update-grub
init 6

Remove cloud-init package and folder
This last method is not disabling cloud-init but completely removing cloud-init package from your Ubuntu Server machine.
  • Remove cloud-init package completely
apt purge cloud-init -y
  • Remove /etc/cloud folder
rm -Rf /etc/cloud
  • Reboot the system
init 6

This video from Youtube will show you the step-by-step guide on disabling or removing cloud-init from Ubuntu Server 20.04 LTS.

Related Posts

    Post a Comment

    Subscribe Our Newsletter