Skip to main content

Removing cloud-init from Ubuntu 20.04

ObjectiveTo disable or remove cloud-init from your ubuntu 20.04 Server

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

 

You will see that boot time has dramatically decreased.