APT, 또는 고급 패키지 도구는 데비안/우분투 기반 운영 체제에서 패키지 관리를 위한 핵심적인 명령줄 인터페이스입니다.
apt-get과 같은 패키지 관리자들 중 하나이며, 소스 코드를 직접 빌드할 필요 없이 다른 패키지들을 설치, 수정, 또는 제거할 수 있는 강력한 기능을 제공합니다. 패키지 관리와 관련된 다양한 작업을 수행할 수 있으며, 아래에서 더 자세히 다룰 것입니다.
일반적으로 apt 명령은 다음과 같은 구조를 따릅니다:
$ apt [명령어] [패키지명]
apt를 사용할 때는 sudo 명령어를 함께 사용하는 것을 잊지 않도록 주의해야 합니다. 이는 대부분의 하위 명령이 시스템 레벨의 변경 권한을 필요로 하기 때문입니다.
이 글에서는 apt 명령어와 함께 사용 가능한 다양한 하위 명령어들과 그 사용법을 상세히 알아보겠습니다.
패키지 데이터베이스 갱신
apt가 정상적으로 작동하기 위해서는 데비안/우분투 시스템에 설치 가능한 모든 패키지 정보가 담긴 패키지 저장소 데이터베이스가 필요합니다. apt는 패키지의 이름, 버전, 아키텍처, 그리고 원격 저장소 위치와 같은 세부 정보를 알아야만 패키지 설치를 시작할 수 있습니다. 따라서 패키지 설치 전에는 반드시 이 데이터베이스를 업데이트해야 합니다.
리포지토리 데이터베이스를 업데이트하는 방법은 간단하며, 다음 명령어를 사용하면 됩니다:
$ sudo apt update
예시:
[email protected]:~$ sudo apt update Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] Hit:2 http://azure.archive.ubuntu.com/ubuntu focal InRelease Get:3 http://azure.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Get:4 http://azure.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Get:5 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1086 kB] Get:6 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [841 kB] Fetched 2255 kB in 1s (2677 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 14개의 패키지를 업그레이드할 수 있습니다. 'apt list --upgradable' 명령을 실행하여 확인하십시오. [email protected]:~$
설치된 패키지 업그레이드
시스템에 설치된 패키지들을 최신 버전으로 업데이트하려면 다음 명령을 사용할 수 있습니다:
$ sudo apt upgrade
upgrade 명령은 패키지 간의 의존성을 고려하여 필요한 경우 패키지를 설치하지만, 기존 패키지를 제거하지는 않습니다. 만약 패키지 업그레이드 과정에서 기존 패키지 제거가 필요하다면, 해당 패키지에 대한 업그레이드는 진행되지 않습니다.
예시:
[email protected]:~$ sudo apt update Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] Hit:2 http://azure.archive.ubuntu.com/ubuntu focal InRelease Get:3 http://azure.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Get:4 http://azure.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Get:5 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1086 kB] Get:6 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [841 kB] Fetched 2255 kB in 1s (2677 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 14개의 패키지를 업그레이드할 수 있습니다. 'apt list --upgradable' 명령을 실행하여 확인하십시오. [email protected]:~$ sudo apt upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 다음 패키지들이 업그레이드될 것입니다: apt apt-utils libapt-pkg6.0 libpython3.8 libpython3.8-minimal libpython3.8-stdlib libuv1 linux-base linux-base-sgx open-vm-tools python3-distupgrade python3.8 python3.8-minimal ubuntu-release-upgrader-core 14개 업그레이드, 0개 새로 설치, 0개 제거, 0개 업그레이드하지 않음. 9485 kB의 아카이브를 받아야 합니다. 이 작업 후, 603 kB의 추가 디스크 공간이 사용됩니다. 계속하시겠습니까? [Y/n] Y Get:1 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libapt-pkg6.0 amd64 2.0.6 [835 kB] Get:2 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apt amd64 2.0.6 [1296 kB] Get:3 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 apt-utils amd64 2.0.6 [216 kB] Get:4 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8 amd64 3.8.10-0ubuntu1~20.04 [1625 kB] Get:5 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8 amd64 3.8.10-0ubuntu1~20.04 [387 kB] Get:6 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-stdlib amd64 3.8.10-0ubuntu1~20.04 [1675 kB] Get:7 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3.8-minimal amd64 3.8.10-0ubuntu1~20.04 [1898 kB] Get:8 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libpython3.8-minimal amd64 3.8.10-0ubuntu1~20.04 [717 kB] Get:9 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libuv1 amd64 1.34.2-1ubuntu1.3 [80.8 kB] Get:10 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 ubuntu-release-upgrader-core all 1:20.04.35 [23.9 kB] Get:11 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-distupgrade all 1:20.04.35 [104 kB] Get:12 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-base all 4.5ubuntu3.6 [17.8 kB] Get:13 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 linux-base-sgx all 4.5ubuntu3.6 [4660 B] Get:14 http://azure.archive.ubuntu.com/ubuntu focal-updates/universe amd64 open-vm-tools amd64 2:11.2.5-2ubuntu1~ubuntu20.04.1 [604 kB] Fetched 9485 kB in 0s (54.4 MB/s) Preconfiguring packages ... (Reading database ... 59511 files and directories currently installed.) Preparing to unpack .../libapt-pkg6.0_2.0.6_amd64.deb ... Unpacking libapt-pkg6.0:amd64 (2.0.6) over (2.0.5) ... Setting up libapt-pkg6.0:amd64 (2.0.6) ... (Reading database ... 59511 files and directories currently installed.) Preparing to unpack .../archives/apt_2.0.6_amd64.deb ... Unpacking apt (2.0.6) over (2.0.5) ... Setting up apt (2.0.6) ... (Reading database ... 59511 files and directories currently installed.) Preparing to unpack .../00-apt-utils_2.0.6_amd64.deb ... Unpacking apt-utils (2.0.6) over (2.0.5) ... Preparing to unpack .../01-libpython3.8_3.8.10-0ubuntu1~20.04_amd64.deb ... Unpacking libpython3.8:amd64 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.3) ... Preparing to unpack .../02-python3.8_3.8.10-0ubuntu1~20.04_amd64.deb ... Unpacking python3.8 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.3) ... Preparing to unpack .../03-libpython3.8-stdlib_3.8.10-0ubuntu1~20.04_amd64.deb ... Unpacking libpython3.8-stdlib:amd64 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.3) ... Preparing to unpack .../04-python3.8-minimal_3.8.10-0ubuntu1~20.04_amd64.deb ... Unpacking python3.8-minimal (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.3) ... Preparing to unpack .../05-libpython3.8-minimal_3.8.10-0ubuntu1~20.04_amd64.deb ... Unpacking libpython3.8-minimal:amd64 (3.8.10-0ubuntu1~20.04) over (3.8.5-1~20.04.3) ... Preparing to unpack .../06-libuv1_1.34.2-1ubuntu1.3_amd64.deb ... Unpacking libuv1:amd64 (1.34.2-1ubuntu1.3) over (1.34.2-1ubuntu1.1) ... Preparing to unpack .../07-ubuntu-release-upgrader-core_1%3a20.04.35_all.deb ... Unpacking ubuntu-release-upgrader-core (1:20.04.35) over (1:20.04.33) ... Preparing to unpack .../08-python3-distupgrade_1%3a20.04.35_all.deb ... Unpacking python3-distupgrade (1:20.04.35) over (1:20.04.33) ... Preparing to unpack .../09-linux-base_4.5ubuntu3.6_all.deb ... Unpacking linux-base (4.5ubuntu3.6) over (4.5ubuntu3.1) ... Preparing to unpack .../10-linux-base-sgx_4.5ubuntu3.6_all.deb ... Unpacking linux-base-sgx (4.5ubuntu3.6) over (4.5ubuntu3.1) ... Preparing to unpack .../11-open-vm-tools_2%3a11.2.5-2ubuntu1~ubuntu20.04.1_amd64.deb ... Unpacking open-vm-tools (2:11.2.5-2ubuntu1~ubuntu20.04.1) over (2:11.0.5-4) ... Setting up libpython3.8-minimal:amd64 (3.8.10-0ubuntu1~20.04) ... Setting up apt-utils (2.0.6) ... Setting up linux-base (4.5ubuntu3.6) ... Setting up python3-distupgrade (1:20.04.35) ... Setting up libuv1:amd64 (1.34.2-1ubuntu1.3) ... Setting up linux-base-sgx (4.5ubuntu3.6) ... Setting up ubuntu-release-upgrader-core (1:20.04.35) ... Setting up python3.8-minimal (3.8.10-0ubuntu1~20.04) ... Setting up open-vm-tools (2:11.2.5-2ubuntu1~ubuntu20.04.1) ... Installing new version of config file /etc/vmware-tools/tools.conf.example ... Installing new version of config file /etc/vmware-tools/vgauth.conf ... Setting up libpython3.8-stdlib:amd64 (3.8.10-0ubuntu1~20.04) ... Setting up python3.8 (3.8.10-0ubuntu1~20.04) ... Setting up libpython3.8:amd64 (3.8.10-0ubuntu1~20.04) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Processing triggers for systemd (245.4-4ubuntu3.7) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for mime-support (3.64ubuntu1) ... [email protected]:~$
업그레이드 도중 발생할 수 있는 문제를 예방하고, 저장소로부터 최신 패키지를 확보하기 위해서는, 패키지를 업그레이드하기 전에 sudo apt update 명령어를 먼저 실행해야 합니다. 이 두 명령어를 아래와 같이 한 줄로 결합하여 실행할 수도 있습니다:
$ sudo apt update && sudo apt upgrade -y
전체 시스템 업그레이드
apt는 full-upgrade라는 추가 업그레이드 명령을 제공합니다. 이는 시스템 전체를 업그레이드할 때 필요하다면 기존 설치된 패키지를 제거할 수 있다는 점에서 upgrade 명령어와 차이가 있습니다. 따라서 full-upgrade 명령어는 사용에 주의를 기울여야 하며, 가능한 경우 upgrade 명령어를 사용하는 것이 좋습니다.
$ sudo apt full-upgrade
단일 패키지 설치
apt를 사용하여 새로운 패키지를 설치하려면 다음 구문을 사용합니다:
$ sudo apt install [패키지 이름]
예시:
[email protected]:~$ sudo apt install unzip
Reading package lists... Done
Building dependency tree
Reading state information... Done
다음 패키지들을 설치하는 것을 제안합니다:
zip
다음 새 패키지들이 설치될 것입니다:
unzip
0개 업그레이드, 1개 새로 설치, 0개 제거, 14개 업그레이드하지 않음.
169 kB의 아카이브를 받아야 합니다.
이 작업 후, 593 kB의 추가 디스크 공간이 사용됩니다.
Get:1 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 unzip amd64 6.0-25ubuntu1 [169 kB]
Fetched 169 kB in 0s (4040 kB/s)
Selecting previously unselected package unzip.
(Reading database ... 59511 files and directories currently installed.)
Preparing to unpack .../unzip_6.0-25ubuntu1_amd64.deb ...
Unpacking unzip (6.0-25ubuntu1) ...
Setting up unzip (6.0-25ubuntu1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
[email protected]:~$
여러 패키지 설치
apt를 사용하여 시스템에 여러 패키지를 한 번에 설치할 수도 있습니다. 이전 예제와 유사한 구문을 따릅니다:
$ sudo apt install [패키지 이름 1] [패키지 이름 2] ... [패키지 이름 n]
예시:
[email protected]:~$ sudo apt install zip unzip Reading package lists... Done Building dependency tree Reading state information... Done 다음 새 패키지들이 설치될 것입니다: unzip zip 0개 업그레이드, 2개 새로 설치, 0개 제거, 0개 업그레이드하지 않음. 336 kB의 아카이브를 받아야 합니다. 이 작업 후, 1231 kB의 추가 디스크 공간이 사용됩니다. Get:1 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 unzip amd64 6.0-25ubuntu1 [169 kB] Get:2 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 zip amd64 3.0-11build1 [167 kB] Fetched 336 kB in 0s (7749 kB/s) Selecting previously unselected package unzip. (Reading database ... 59527 files and directories currently installed.) Preparing to unpack .../unzip_6.0-25ubuntu1_amd64.deb ... Unpacking unzip (6.0-25ubuntu1) ... Selecting previously unselected package zip. Preparing to unpack .../zip_3.0-11build1_amd64.deb ... Unpacking zip (3.0-11build1) ... Setting up unzip (6.0-25ubuntu1) ... Setting up zip (3.0-11build1) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for mime-support (3.64ubuntu1) ... [email protected]:~$
만약 지정된 패키지 중 이미 설치된 것이 있다면, apt는 저장소에서 업데이트를 확인하고 사용 가능한 경우 패키지를 업그레이드하거나, 이미 설치된 버전을 그대로 유지합니다.
특정 버전 설치
특히 기업 환경에서는 특정 버전의 패키지를 설치해야 하는 경우가 많습니다. apt를 사용하면 저장소에 해당 버전이 존재하는 경우 다음과 같이 특정 버전을 지정하여 설치할 수 있습니다:
$ sudo apt install [패키지 이름]=[버전]
예시:
[email protected]:~$ sudo apt install unzip=6.0-25ubuntu1 Reading package lists... Done Building dependency tree Reading state information... Done 다음 새 패키지들이 설치될 것입니다: unzip 0개 업그레이드, 1개 새로 설치, 0개 제거, 0개 업그레이드하지 않음. 169 kB의 아카이브를 받아야 합니다. 이 작업 후, 593 kB의 추가 디스크 공간이 사용됩니다. Get:1 http://azure.archive.ubuntu.com/ubuntu focal/main amd64 unzip amd64 6.0-25ubuntu1 [169 kB] Fetched 169 kB in 0s (2767 kB/s) Selecting previously unselected package unzip. (Reading database ... 59541 files and directories currently installed.) Preparing to unpack .../unzip_6.0-25ubuntu1_amd64.deb ... Unpacking unzip (6.0-25ubuntu1) ... Setting up unzip (6.0-25ubuntu1) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for man-db (2.9.1-1) ... [email protected]:~$
패키지 제거
패키지 설치와 마찬가지로, apt는 다음 명령을 사용하여 시스템에서 패키지를 제거할 수 있도록 합니다:
$ sudo apt remove [패키지 이름]
예시:
[email protected]:~$ sudo apt remove unzip Reading package lists... Done Building dependency tree Reading state information... Done 다음 패키지들이 제거될 것입니다: unzip 0개 업그레이드, 0개 새로 설치, 1개 제거, 14개 업그레이드하지 않음. 이 작업 후, 593 kB의 디스크 공간이 확보될 것입니다. 계속하시겠습니까? [Y/n] Y (Reading database ... 59529 files and directories currently installed.) Removing unzip (6.0-25ubuntu1) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for mime-support (3.64ubuntu1) ... [email protected]:~$
패키지 완전 제거
패키지 제거와 유사하게, purge 명령어는 패키지를 제거하는 데 사용되지만, remove 명령어가 패키지의 바이너리 파일만 제거하고 설정 파일은 그대로 남겨두는 것과 달리, purge 명령어는 패키지와 관련된 모든 것(바이너리, 설정 파일 모두)을 시스템에서 완전히 제거합니다. 설정 파일을 남겨두면 나중에 해당 애플리케이션을 다시 설치할 때 동일한 설정 파일을 재사용할 수 있습니다.
패키지를 완전히 제거하려면 다음 명령어를 사용하십시오:
$ sudo apt purge [패키지 이름]
예시:
[email protected]:~$ sudo apt purge unzip Reading package lists... Done Building dependency tree Reading state information... Done 다음 패키지들이 제거될 것입니다: unzip* 0개 업그레이드, 0개 새로 설치, 1개 제거, 14개 업그레이드하지 않음. 이 작업 후, 593 kB의 디스크 공간이 확보될 것입니다. 계속하시겠습니까? [Y/n] Y (Reading database ... 59529 files and directories currently installed.) Removing unzip (6.0-25ubuntu1) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for mime-support (3.64ubuntu1) ... (Reading database ... 59511 files and directories currently installed.) Purging configuration files for unzip (6.0-25ubuntu1) ... [email protected]:~$
패키지 검색
apt는 단순히 패키지를 설치하고 제거하는 도구일 뿐만 아니라, search 명령어를 사용하여 저장소에서 필요한 패키지를 검색하는 데에도 사용할 수 있습니다:
$ apt search [검색어]
예시:
[email protected]:~$ apt search netstat 정렬 중... 완료 전체 텍스트 검색... 완료 bwm-ng/focal 0.6.2-1 amd64 작고 간단한 콘솔 기반 대역폭 모니터 gnome-nettool/focal 3.8.1-3 amd64 그놈을 위한 네트워크 정보 도구 golang-github-aelsabbahy-gonetstat-dev/focal 0.0~git20160428.0.edf89f7-3 all Go로 구현된 Netstat golang-github-mwitkow-go-conntrack-dev/focal 0.0~git20190716.2f06839-1 all net.Conn 추적을 위한 Go 미들웨어 libparse-netstat-perl/focal 0.14-1 all "netstat" 명령어의 출력을 파싱하는 모듈 net-tools/focal 1.60+git20180626.aebd88e-1ubuntu1 amd64 NET-3 네트워킹 툴킷 netstat-nat/focal 1.4.10-3build1 amd64 NAT 연결을 표시하는 도구 nicstat/focal 1.95-1build1 amd64 네트워크 트래픽 통계 출력 qnetstatview/focal 1.5.6-1 amd64 모든 TCP 및 UDP 엔드포인트에 대한 자세한 목록 표시 unhide/focal 20130526-4 amd64 숨겨진 프로세스 및 포트를 찾는 포렌식 도구 whichman/focal 2.4-9 amd64 결함 허용 검색 유틸리티: whichman, ftff, ftwhich [email protected]:~$
패키지 정보 확인
패키지에 대한 자세한 정보를 보려면, 패키지가 이미 설치되어 있는지, 또는 설치할 예정인지에 관계없이 show 명령어를 사용할 수 있습니다:
$ apt show [패키지 이름]
예시:
[email protected]:~$ apt show firefox
Package: firefox
Version: 90.0+build1-0ubuntu0.20.04.1
Priority: optional
Section: web
Origin: Ubuntu
Maintainer: Ubuntu Mozilla Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 226 MB
Provides: gnome-www-browser, iceweasel, www-browser
Depends: lsb-release, libatk1.0-0 (>= 1.12.4), libc6 (>= 2.30), libcairo-gobject2 (>= 1.10.0), libcairo2 (>= 1.10.0), libdbus-1-3 (>= 1.9.14), libdbus-glib-1-2 (>= 0.78), libfontconfig1 (>= 2.12.6), libfreetype6 (>= 2.10.1), libgcc-s1 (>= 3.3), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.42), libgtk-3-0 (>= 3.14), libharfbuzz0b (>= 0.6.0), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpangoft2-1.0-0 (>= 1.14.0), libstdc++6 (>= 9), libx11-6, libx11-xcb1 (>= 2:1.6.9), libxcb-shm0, libxcb1, libxcomposite1 (>= 1:0.4.5), libxcursor1 (>> 1.1.2), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxi6, libxrender1, libxt6
Recommends: xul-ext-ubufox, libcanberra0, libdbusmenu-glib4, libdbusmenu-gtk3-4
Suggests: fonts-lyx
Replaces: kubuntu-firefox-installer
Task: ubuntu-desktop-minimal, ubuntu-desktop, kubuntu-desktop, kubuntu-full, xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
Xul-Appid: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
Download-Size: 57.0 MB
APT-Sources: http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
Description: Mozilla에서 제공하는 안전하고 쉬운 웹 브라우저
Firefox는 안전하고 쉬운 웹 브라우징 경험을 제공합니다. 친숙한 사용자 인터페이스, 온라인 개인 정보 도용으로부터의 보호 기능을 포함한 향상된 보안 기능, 통합 검색 기능을 통해 웹을 최대한 활용할 수 있습니다.
N: 1개의 추가 레코드가 있습니다. 자세한 내용은 '-a' 스위치를 사용하십시오.
[email protected]:~$
설치된 패키지 목록 확인
다양한 이유로 시스템에 설치된 패키지 목록을 확인해야 할 때가 있습니다. apt를 사용하면 다음 명령어로 간단하게 설치된 패키지 목록을 얻을 수 있습니다:
$ apt list --installed
사용 가능한 모든 패키지 목록 확인
시스템에서 사용 가능한 모든 패키지 목록을 보려면, --all-versions 키워드와 함께 list 명령어를 사용하십시오:
$ apt list --all-versions
업그레이드 가능한 패키지 목록 확인
지속적으로 새로운 기능이 추가되고, 버그가 수정되며, 보안 결함을 포함한 중요한 수정 사항이 담긴 패키지의 최신 버전이 릴리스됩니다. 따라서 패키지를 최신 상태로 유지하는 것이 중요합니다. apt를 사용하면 이 글 앞부분에서 소개한 upgrade 명령어로 데비안/우분투 시스템을 간편하게 업데이트할 수 있습니다. 시스템에 설치된 패키지 중 업그레이드가 필요한 모든 패키지 목록을 확인하려면 다음 명령어를 실행하십시오:
$ apt list --upgradable
예시:
[email protected]:~$ apt list --upgradable Listing... Done apt-utils/focal-updates 2.0.6 amd64 [업그레이드 가능: 2.0.5] apt/focal-updates 2.0.6 amd64 [업그레이드 가능: 2.0.5] libapt-pkg6.0/focal-updates 2.0.6 amd64 [업그레이드 가능: 2.0.5] libpython3.8-minimal/focal-updates,focal-security 3.8.10-0ubuntu1~20.04 amd64 [업그레이드 가능: 3.8.5-1~20.04.3] libpython3.8-stdlib/focal-updates,focal-security 3.8.10-0ubuntu1~20.04 amd64 [업그레이드 가능: 3.8.5-1~20.04.3] libpython3.8/focal-updates,focal-security 3.8.10-0ubuntu1~20.04 amd64 [업그레이드 가능: 3.8.5-1~20.04.3] libuv1/focal-updates,focal-security 1.34.2-1ubuntu1.3 amd64 [업그레이드 가능: 1.34.2-1ubuntu1.1] linux-base-sgx/focal-updates 4.5ubuntu3.6 all [업그레이드 가능: 4.5ubuntu3.1] linux-base/focal-updates 4.5ubuntu3.6 all [업그레이드 가능: 4.5ubuntu3.1] open-vm-tools/focal-updates 2:11.2.5-2ubuntu1~ubuntu20.04.1 amd64 [업그레이드 가능: 2:11.0.5-4] python3-distupgrade/focal-updates 1:20.04.35 all [업그레이드 가능: 1:20.04.33] python3.8-minimal/focal-updates,focal-security 3.8.10-0ubuntu1~20.04 amd64 [업그레이드 가능: 3.8.5-1~20.04.3] python3.8/focal-updates,focal-security 3.8.10-0ubuntu1~20.04 amd64 [업그레이드 가능: 3.8.5-1~20.04.3] ubuntu-release-upgrader-core/focal-updates 1:20.04.35 all [업그레이드 가능: 1:20.04.33] [email protected]:~$
미사용 패키지 정리
시스템을 사용하다 보면 더 이상 필요하지 않은 패키지가 설치된 채로 남아있는 경우가 있습니다. 이러한 패키지들은 이전에 제거된 다른 패키지의 종속성으로 설치되었으나, 종속성 자체가 시스템에 남아있는 경우입니다. 이러한 패키지를 정리하여 디스크 공간을 확보하려면 다음 명령어를 사용할 수 있습니다:
$ sudo apt autoremove
예시:
[email protected]:~$ sudo apt autoremove Reading package lists... Done Building dependency tree