For Cloud Server

In this article, we'll show you how to remove an additional public IPv4 or IPv6 address from a Linux server running Ubuntu 20.04 or 22.04.

Prerequisite

You have unassigned the additional public IPv4 or IPv6 address in the Cloud Panel.

  • Log in to the server.

  • Open the etc/netplan/01-netcfg.yaml file. Enter the following command:

    [root@localhost ~]# sudo vi etc/netplan/01-netcfg.yaml

  • In the etc/netplan/01-netcfg.yaml file, delete the associated entries in the addresses section.

  • Restart the server to apply the changes. To do this, enter the following command:

    [root@localhost ~]# systemctl reboot