22.04 시스템에 구성된 16.04 저장소를 어떻게 삭제합니까?

22.04 시스템에 구성된 16.04 저장소를 어떻게 삭제합니까?

sudo apt update터미널에 추가하면 22.04 시스템에 xenial(16.04 저장소)이 있다는 경고가 표시됩니다. 명령을 추가했습니다 find /etc/apt -type f -exec grep xenial {} +. 아래 출력을 추가하겠습니다. xenial(16.04 저장소)이 있음이 표시됩니다. 이를 제거하기 위해 '/etc/apt/sources.list.d/official-source-repositories.list'nano cli 편집기와 gedit 텍스트 편집기를 사용하여 열었습니다. xenial을 참조하는 줄이 없습니다. 또 다른 것이 있습니까? 어떻게 제거하나요?

1. sudo apt 업데이트 경고

W: http://dl.openfoam.org/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://download.docker.com/linux/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: http://packages.osrfoundation.org/gazebo/ubuntu-stable/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

find /etc/apt -type f -exec grep xenial {} +2.출력

/etc/apt/sources.list.d/official-source-repositories.list.save:deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list.d/official-source-repositories.list.save:deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list.d/official-source-repositories.list.save:deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
/etc/apt/sources.list.d/official-source-repositories.list:deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
/etc/apt/sources.list.d/official-source-repositories.list:# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
/etc/apt/sources.list.d/official-source-repositories.list:deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted

답변1

다음을 편집하여 22.04 시스템에서 16.04 저장소를 제거할 수 있습니다.소프트웨어 소스 목록. 먼저 텍스트 편집기를 사용하여 소스 목록을 엽니다.

sudo nano /etc/apt/sources.list

그런 다음 16.04 저장소에 대한 참조가 포함된 줄을 찾아 삭제합니다. 완료되면 파일을 저장하고 편집기를 종료합니다.

리포지토리를 삭제한 후 시스템이 변경 사항을 인식하도록 패키지 목록을 업데이트해야 합니다.

sudo apt update

이렇게 하면 시스템이 최신 패키지 정보로 업데이트되고 16.04 저장소에 대한 참조가 제거됩니다.

관련 정보