[Ubuntu] disable apt-daily.timer & apt-daily-upgrade.timer & unattended-upgrades

ubuntu 리눅스의 자동 패키지 업데이트 비활성화

 

개요

우분투(ubuntu-20.04) 리눅스는 “서비스” & “타이머”를 이용하여 정기적인 업데이트를 “자동”으로 수행

  • apt-daily : upgrade 대상 다운로드
  • apt-daily-upgrade : upgrade 대상에 대한 실제 upgrade 수행
  • unattended-upgrades : 최신 업데이트 등을 자동으로 설치

 

 

검토

편리하고 좋은 기능이지만…

자동으로 패키지가 업그레이드 되면서

  • 데몬이 종료되어 버리거나
  • 재시작 과정에서 정상적으로 수행을 못하고 있거나
  • 원치않거나 그래선 안되는 프로세스도 영향을 받는

이슈가 종종 있기 때문에 (충분한 가능성과 실제 발생사례)

민감도가 높은 시스템에서는 이를 수행할 시 리스크가 있음

 

 

apt-daily 비활성화

  • 기본값 : 활성화

 

1. 활성화 상태 확인


# systemctl list-timers | grep apt-daily
Tue 2022-07-19 04:34:05 KST 13h left Mon 2022-07-18 07:35:01 KST 7h ago apt-daily.timer apt-daily.service 
Tue 2022-07-19 06:12:01 KST 15h left Mon 2022-07-18 06:05:01 KST 8h ago apt-daily-upgrade.timer apt-daily-upgrade.service

# systemctl status apt-daily.timer
# systemctl status apt-daily-upgrade.timer
==> 해당 명령어 수행시 enable and active 상태 확인 가능

apt-daily, apt-daily-upgrade 로 확인하면 inactive 로 나옴(나올 수 있음)을 주의 하자, 뒤에 “.timer”가 붙는다

 

2. 비활성화


# systemctl stop apt-daily.timer
# systemctl disable apt-daily.timer

# systemctl stop apt-daily-upgrade.timer
# systemctl disable apt-daily-upgrade.timer


 

 

unattended-upgrades 비활성화

구글에서 검색하면 보통은


dpkg-reconfigure unattended-upgrades
<No>선택

또는

apt remove unattended-upgrades
로 패키지 삭제

만 줄기 차게 나온다.
이 방법이 잘못 되었다는것은 아니고

엄연히 systemctl 로 관리되고 있는 패키지를
사용하지 않으려는 상황이라고 해서 굳이 “unattended-upgrades” 만 선택&편집 등의 방법을 쓰는것은 좀…

깔끔하게 systemctl 로 처리하자


systemctl stop unattended-upgrades
systemctl disable unattended-upgrades


 

About KENNETH 19688 Articles
지락문화예술공작단

Be the first to comment

Leave a Reply

Your email address will not be published.


*


이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.