When you connect to a Wi-Fi network in Ubuntu, the system saves the password and configuration so you can connect automatically next time. While convenient, this can cause problems if the network password changes or if you no longer want your laptop to auto-connect to a specific public hotspot. To fix this, you must tell Ubuntu to “forget” the network.
Method 1: Using the Graphical Settings Menu (Easiest)
If you prefer using a visual interface, you can delete networks directly from the main system settings.
- Open the Settings app from your application menu (or click the battery/network icon in the top-right corner of the screen and select Settings).
- Click on Wi-Fi in the left-hand sidebar.
- Look for the three-dots icon (or a button labeled “Known Wi-Fi Networks”) near the top right of the Wi-Fi panel. Click it.
- Select Known Wi-Fi Networks from the drop-down menu.
- A list of every network your computer has ever connected to will appear. Scroll through and find the network you want to remove.
- Click on the network name, and click the Forget button.
Method 2: Using the Terminal (Fastest)
If you are comfortable using the command line, you can delete a network using the Network Manager Command Line Interface (`nmcli`) in just a few seconds.
- Open the Terminal (press Ctrl + Alt + T).
- Type the following command and press Enter to see a list of all your saved connections:
nmcli connection show - Find the exact name of the Wi-Fi network in the “NAME” column.
- Type the following command, replacing
"Network-Name"with the actual name of the network you found in the previous step (keep the quotation marks):sudo nmcli connection delete "Network-Name" - Press Enter. You may be prompted to enter your administrator password to confirm the deletion.