-
Create an empty file to prevent the service from starting
sudo touch /etc/cloud/cloud-init.disabled
-
Disable all services (uncheck everything except "None"):
sudo dpkg-reconfigure cloud-init
-
Uninstall the package and delete the folders
sudo dpkg-reconfigure cloud-init sudo apt-get purge cloud-init sudo rm -rf /etc/cloud/ && sudo rm -rf /var/lib/cloud/
-
Restart the computer
sudo reboot
the folders /etc/cloud/ and /var/lib/cloud/ are not empty after
sudo apt-get purge cloud-init
- they still contain a bunch of config files - otherwise it is sufficient.