How to Remove Cloud-Init From Ubuntu Server 20.04

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:

sudo touch /etc/cloud/cloud-init.disabled

  • and reboot:

init 6

Method 2: 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

sudo apt purge cloud-init -y

  • Remove /etc/cloud folder

sudo rm -rf /etc/cloud && sudo rm -rf /var/lib/cloud/

  • Reboot the system

init 6