<===
2025-09-23 06:45:15
To disable automatic updates on Ubuntu, you can modify the settings for the unattended-upgrades service, which handles automatic updates. Below are the steps to disable it:
apt remove update-manager
### Method 1: Disable Automatic Updates via Configuration
1. **Edit the unattended-upgrades configuration file**:
Open a terminal and edit the configuration file with a text editor like `nano`:
```bash
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
```
2. **Modify the settings**:
Look for the following lines (or similar):
```bash
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
```
Change the values to `0` to disable automatic updates:
```bash
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";
```
3. **Save and exit**:
Press `Ctrl+O`, then `Enter` to save, and `Ctrl+X` to exit.
4. **Stop and disable the unattended-upgrades service**:
Run the following commands to stop the service and prevent it from starting on boot:
```bash
sudo systemctl stop unattended-upgrades
sudo systemctl disable unattended-upgrades
```
### Method 2: Disable via Software & Updates GUI
1. **Open Software & Updates**:
Search for "Software & Updates" in the Ubuntu application menu and open it.
2. **Go to the Updates tab**:
In the "Software & Updates" window, navigate to the **Updates** tab.
3. **Disable automatic updates**:
- Set the **Automatically check for updates** dropdown to **Never**.
- Uncheck any options related to automatic updates (e.g., security updates or other updates).
4. **Apply changes**:
Click **OK** or **Close** to save the settings. You may need to enter your password.
### Method 3: Completely Remove Unattended-Upgrades
If you want to remove the unattended-upgrades package entirely:
1. **Uninstall the package**:
```bash
sudo apt remove --purge unattended-upgrades
```
2. **Clean up residual files**:
```bash
sudo apt autoremove
```
### Verify Automatic Updates Are Disabled
To confirm that automatic updates are disabled:
- Check the status of the unattended-upgrades service:
```bash
systemctl status unattended-upgrades
```
It should show as **inactive** or **disabled**.
### Notes
- Disabling automatic updates means you’ll need to manually check for and install updates using `sudo apt update && sudo apt upgrade` to keep your system secure.
- If you only want to disable specific types of updates (e.g., non-security updates), you can fine-tune the settings in `/etc/apt/apt.conf.d/50unattended-upgrades` instead of disabling everything.