Skip to content

Instantly share code, notes, and snippets.

@ksakyi21
Forked from zoilomora/README.md
Created May 1, 2021 13:04
Show Gist options
  • Save ksakyi21/d0fbd8a9b25e2f240688325d28c735c8 to your computer and use it in GitHub Desktop.
Save ksakyi21/d0fbd8a9b25e2f240688325d28c735c8 to your computer and use it in GitHub Desktop.

Revisions

  1. @zoilomora zoilomora created this gist Jun 13, 2019.
    28 changes: 28 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    # How to disable cloud-init in Ubuntu

    ## Prevent start

    - Create an empty file to prevent the service from starting

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

    ## Uninstall

    - Disable all services (uncheck everything except "None"):

    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

    ## Sources

    - https://cloudinit.readthedocs.io/en/latest/topics/boot.html#generator
    - https://www.blackmoreops.com/2019/04/19/remove-cloud-init-from-ubuntu/