For stable desktop PC, make updates more like windows/ios, don't need to deal with discover/app store or apt updates cli
sudo systemctl disable apt-daily.timer
sudo systemctl mask apt-daily.timer
sudo systemctl disable apt-daily.service
sudo systemctl mask apt-daily.service
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl mask apt-daily-upgrade.timer
sudo systemctl disable apt-daily-upgrade.service
sudo systemctl mask apt-daily-upgrade.service
sudo systemctl disable apt-xapian-index.timer
sudo systemctl mask apt-xapian-index.timer
sudo systemctl disable apt-xapian-index.service
sudo systemctl mask apt-xapian-index.service
sudo systemctl disable cloud-init.service
sudo systemctl mask cloud-init.service
Create /etc/systemd/system/sysUpdates.timer
Change timer to when you want updates to occur - 2:15am
[Unit]
Description=System Updates
Requires=network-online.target
After=network-online.target
[Timer]
OnCalendar=*-*-* 02:15
RandomizedDelaySec=1h
Persistent=true
Unit=sysUpdates.service
[Install]
WantedBy=timers.target
Create /etc/systemd/system/sysUpdates.service
[Install]
WantedBy=multi-user.target
Also=sysUpdates.timer
[Unit]
Description=System Updates
After=network.target network-online.target
Requires=network-online.target
[Service]
LogLevelMax=4
Type=oneshot
ExecStart=/usr/bin/apt update -y
ExecStart=/usr/bin/apt full-upgrade -y
KillMode=process
TimeoutStopSec=960
After, Run
sudo systemctl enable sysUpdates.timer
sudo systemctl start sysUpdates.timer
Verify systemctl status sysUpdates.timer
One last step Remove Discover notifier from autostart
rm /etc/xdg/autostart/discover-notifier.desktop
Create /etc/systemd/system/apt-cleaner.timer
[Unit]
Description=Apt Cache Cleaner Timer - Quarterly
[Timer]
OnCalendar=quarterly
RandomizedDelaySec=7200
AccuracySec=8h
Persistent=true
Unit=apt-cleaner.service
[Install]
WantedBy=timers.target
Create /etc/systemd/system/apt-cleaner.service
[Install]
WantedBy=multi-user.target
Also=apt-cleaner.timer
[Unit]
Description=Apt Cache Cleaner Service
[Service]
LogLevelMax=4
Type=oneshot
ExecStart=apt clean -y
ExecStart=apt autoclean -y
ExecStart=aptitude purge ‘~c’
ExecStart=apt autoremove -y --purge
KillMode=process
TimeoutStopSec=960
After, Run
sudo systemctl enable apt-cleaner.timer
sudo systemctl start apt-cleaner.timer
Create $HOME/.config/systemd/user/dailySuspend.timer
[Unit]
Description=Suspend PC Daily 3am
# Requires=dailySuspend.service
[Timer]
OnCalendar=*-*-* 03:00:00
AccuracySec=120sec
# Persistent=true
RandomizedDelaySec=10sec
Unit=dailySuspend.service
[Install]
WantedBy=default.target
Create $HOME/.config/systemd/user/dailySuspend.service
[Unit]
Description=Suspend PC Daily 3am
[Service]
Type=simple
ExecStart=/usr/bin/systemctl suspend
[Install]
WantedBy=multi-user.target
Also=dailySuspend.timer
After, Run
sudo systemctl enable dailySuspend.timer
sudo systemctl start dailySuspend.timer