Last active
          December 13, 2024 17:41 
        
      - 
      
- 
        Save posilva/1cefb5bf1eeccf9382920e5d57a4b3fe to your computer and use it in GitHub Desktop. 
    Remove/Disable Ubuntu SystemD Daily.Timers
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # References: | |
| # | |
| # https://cinhtau.net/2016/12/09/disable-apt-auto-update-and-upgrade/ | |
| # https://unix.stackexchange.com/questions/315502/how-to-disable-apt-daily-service-on-ubuntu-cloud-vm-image | |
| # https://askubuntu.com/questions/824718/ubuntu-16-04-unattended-upgrades-runs-at-random-times/831206 | |
| apt-get -y purge update-notifier-common ubuntu-release-upgrader-core landscape-common unattended-upgrades | |
| systemctl kill --kill-who=all apt-daily.service | |
| systemctl kill --kill-who=all apt-daily-upgrade.service | |
| systemctl stop apt-daily.timer | |
| systemctl disable apt-daily.timer | |
| systemctl stop apt-daily.service | |
| systemctl disable apt-daily.service | |
| systemctl stop apt-daily-upgrade.timer | |
| systemctl disable apt-daily-upgrade.timer | |
| systemctl stop apt-daily-upgrade.service | |
| systemctl disable apt-daily-upgrade.service | |
| systemctl daemon-reload | |
| systemctl reset-failed | |
| rm /etc/systemd/system/timers.target.wants/apt-daily.timer | |
| rm /etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer | |
| mv /usr/lib/apt/apt.systemd.daily /usr/lib/apt/apt.systemd.daily.DISABLED | |
| mv /lib/systemd/system/apt-daily.service /lib/systemd/system/apt-daily.service.DISABLED | |
| mv /lib/systemd/system/apt-daily.timer /lib/systemd/system/apt-daily.timer.DISABLED | |
| mv /lib/systemd/system/apt-daily-upgrade.service /lib/systemd/system/apt-daily-upgrade.service.DISABLED | |
| mv /lib/systemd/system/apt-daily-upgrade.timer /lib/systemd/system/apt-daily-upgrade.timer.DISABLED | |
| # Usefull commands | |
| # systemctl is-enabled apt-daily.service | |
| # systemctl enable apt-daily.service | |
| # systemctl list-units --all apt-daily.service | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Thanks @posilva, I think
systemctl list-timersis an helpful command too.