2025/02/19에 해당하는 글 1

Ubuntu 24.04 APT 저장소 및 키 초기화 하기

리눅스/OS 일반|2025. 2. 19. 10:31
반응형

모든 추가 저장소 삭제
# rm -f /etc/apt/sources.list.d/*.list

모든 GPG 키 삭제
# rm -f /etc/apt/keyrings/*.gpg

기본 APT 저장소 복구 (Ubuntu 24.04 Noble 기준)
# tee /etc/apt/sources.list <<EOF
deb http://archive.ubuntu.com/ubuntu noble main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse
EOF

APT 캐시 및 설정 초기화
# apt clean
# apt autoclean
# apt -y autoremove --purge
r# m -rf /var/lib/apt/lists/*

저장소 업데이트 및 확인
# apt -y update && apt -y upgrade

 

반응형

댓글()