rpm

rpm

info
namerpm
full namerpm
aliasesrpm
tagsrpm

RPM Package Manager. 로컬 RPM 데이터베이스 조회, 패키지 파일 검사, 설치/업그레이드/삭제, 서명 키 import 작업에 사용합니다.

rpm 은 저수준 패키지 관리 도구입니다. 의존성 해결과 저장소 기반 설치는 보통 dnf 또는 yum 이 맡고, rpm 은 설치된 패키지 메타데이터 조회, 파일 소유 패키지 확인, 로컬 .rpm 파일 검사, 강제 설치/재설치 같은 작업에 직접 사용합니다.

rpm -i, rpm -U, rpm -F, rpm -e 는 시스템 상태를 직접 바꿉니다. 의존성 자동 해결이 필요한 일반 설치/업데이트는 dnf 또는 yum 을 우선 사용합니다.
rpm -qa
rpm -qi bash
rpm -ql bash
rpm -qf /usr/bin/ssh
rpm -q --changelog kernel
rpm -ivh package.rpm
rpm -Uvh package.rpm
rpm -e package-name
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  • rpm –query [<switches>…] PACKAGE
  • rpm –package [<switches>…] FILE.rpm
  • rpm –install [<switches>…] FILE.rpm
  • rpm –upgrade [<switches>…] FILE.rpm
  • rpm –erase [<switches>…] PACKAGE
  • -q, –query 설치된 패키지 정보를 조회합니다.
  • -a, –all 설치된 모든 패키지를 조회합니다.
  • -i, –info 패키지 설명, 버전, 릴리스, 빌드 정보 등을 표시합니다.
  • -l, –list 패키지가 설치한 파일 목록을 표시합니다.
  • -f, –file PATH 지정한 파일을 소유한 패키지를 찾습니다.
  • -p, –package FILE.rpm 아직 설치하지 않은 RPM 파일을 대상으로 조회합니다.
  • –changelog PACKAGE 패키지 변경 이력을 표시합니다. 기존 기록 예: kernel.
  • -i, –install FILE.rpm 새 패키지를 설치합니다.
  • -U, –upgrade FILE.rpm 기존 패키지를 업그레이드하거나 없으면 설치합니다.
  • -F, –freshen FILE.rpm 이미 설치된 경우에만 업그레이드합니다.
  • -e, –erase PACKAGE 패키지를 제거합니다.
  • –reinstall FILE.rpm 같은 버전 패키지를 다시 설치합니다.
  • –test 실제 변경 없이 설치/업그레이드 가능 여부를 점검합니다.
  • –nodeps 의존성 검사를 건너뜁니다.
  • –replacepkgs 이미 설치된 패키지도 다시 설치합니다.
  • –replacefiles 파일 충돌을 무시하고 설치를 진행합니다.
  • -h, –hash 진행 중 hash mark 를 출력합니다.
  • -v, –verbose 상세 출력을 활성화합니다.
  • -V, –verify 설치된 패키지 파일 상태를 검증합니다.
  • –import PUBLIC_KEY 공개 GPG 키를 등록합니다.
  • –nosignature 패키지 서명 검사를 건너뜁니다.
  • –nodigest 패키지 digest 검사를 건너뜁니다.
  • -r, –root ROOT 지정한 루트 디렉터리를 기준으로 작업합니다.
  • –dbpath DIRECTORY RPM 데이터베이스 경로를 바꿉니다.
rpm -qa
rpm -qi bash
rpm -ql bash
rpm -qf /usr/bin/ssh
rpm -qp --info ./package.rpm
rpm -qp --list ./package.rpm
rpm -q --changelog kernel
rpm -V openssh-clients
sudo rpm -ivh ./package.rpm
sudo rpm -Uvh ./package.rpm
sudo rpm -Fvh ./package.rpm
sudo rpm --test -Uvh ./package.rpm
sudo rpm -e package-name
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
  • 의존성 오류가 나면 rpm 단독 설치보다 dnf install ./package.rpm 또는 yum localinstall ./package.rpm 이 더 안전합니다.
  • 패키지 파일만 검사하려면 -qp 조합을 사용합니다. 설치된 패키지 조회와 헷갈리기 쉽습니다.
  • –nodeps, –replacefiles, –force 는 복구 목적이 아니면 남용하지 않습니다.
  • GPG 키 삭제는 보통 키 패키지 이름을 먼저 확인한 뒤 rpm -e gpg-pubkey-… 형태로 수행합니다.
  • RHEL, CentOS, Rocky Linux, AlmaLinux, Fedora 계열에서 기본 패키지 형식으로 사용합니다.
  • 최신 배포판에서는 저장소 작업 대부분을 dnf 가 대신하지만, 저수준 메타데이터 조회와 로컬 RPM 파일 검사는 여전히 rpm 이 기준 도구입니다.
  • 일반 사용자 워크플로우에서 직접 rpm -i 로 설치하는 방식은 의존성 자동 해결이 없어 점점 줄고 있습니다.
  • yum localinstall 같은 예전 흐름보다 dnf 기반 설치가 일반적입니다.

++ rpm --help

Usage: rpm [OPTION...]
 
Query/Verify package selection options:
  -a, --all                          query/verify all packages
  -f, --file                         query/verify package(s) owning installed
                                     file
      --path                         query/verify package(s) owning path,
                                     installed or not
  -g, --group                        query/verify package(s) in group
  -p, --package                      query/verify a package file
      --pkgid                        query/verify package(s) with package
                                     identifier
      --hdrid                        query/verify package(s) with header
                                     identifier
      --triggeredby                  query the package(s) triggered by the
                                     package
      --whatconflicts                query/verify the package(s) which require
                                     a dependency
      --whatrequires                 query/verify the package(s) which require
                                     a dependency
      --whatobsoletes                query/verify the package(s) which
                                     obsolete a dependency
      --whatprovides                 query/verify the package(s) which provide
                                     a dependency
      --whatrecommends               query/verify the package(s) which
                                     recommends a dependency
      --whatsuggests                 query/verify the package(s) which
                                     suggests a dependency
      --whatsupplements              query/verify the package(s) which
                                     supplements a dependency
      --whatenhances                 query/verify the package(s) which
                                     enhances a dependency
      --nomanifest                   do not process non-package files as
                                     manifests
 
Query options (with -q or --query):
  -c, --configfiles                  list all configuration files
  -d, --docfiles                     list all documentation files
  -L, --licensefiles                 list all license files
  -A, --artifactfiles                list all artifact files
      --dump                         dump basic file information
  -l, --list                         list files in package
      --queryformat=QUERYFORMAT      use the following query format
  -s, --state                        display the states of the listed files
 
Verify options (with -V or --verify):
      --nofiledigest                 don't verify digest of files
      --nofiles                      don't verify files in package
      --nodeps                       don't verify package dependencies
      --noscript                     don't execute verify script(s)
 
Install/Upgrade/Erase options:
      --allfiles                     install all files, even configurations
                                     which might otherwise be skipped
      --allmatches                   remove all packages which match <package>
                                     (normally an error is generated if
                                     <package> specified multiple packages)
      --badreloc                     relocate files in non-relocatable package
  -e, --erase=<package>+             erase (uninstall) package
      --excludedocs                  do not install documentation
      --excludepath=<path>           skip files with leading component <path>
      --force                        short hand for --replacepkgs
                                     --replacefiles
  -F, --freshen=<packagefile>+       upgrade package(s) if already installed
  -h, --hash                         print hash marks as package installs
                                     (good with -v)
      --ignorearch                   don't verify package architecture
      --ignoreos                     don't verify package operating system
      --ignoresize                   don't check disk space before installing
      --noverify                     short hand for --ignorepayload
                                     --ignoresignature
  -i, --install                      install package(s)
      --justdb                       update the database, but do not modify
                                     the filesystem
      --nodeps                       do not verify package dependencies
      --nofiledigest                 don't verify digest of files
      --nocontexts                   don't install file security contexts
      --nocaps                       don't install file capabilities
      --noorder                      do not reorder package installation to
                                     satisfy dependencies
      --noscripts                    do not execute package scriptlet(s)
      --notriggers                   do not execute any scriptlet(s) triggered
                                     by this package
      --oldpackage                   upgrade to an old version of the package
                                     (--force on upgrades does this
                                     automatically)
      --percent                      print percentages as package installs
      --prefix=<dir>                 relocate the package to <dir>, if
                                     relocatable
      --relocate=<old>=<new>         relocate files from path <old> to <new>
      --replacefiles                 ignore file conflicts between packages
      --replacepkgs                  reinstall if the package is already
                                     present
      --test                         don't install, but tell if it would work
                                     or not
  -U, --upgrade=<packagefile>+       upgrade package(s)
      --reinstall=<packagefile>+     reinstall package(s)
 
Common options for all rpm modes and executables:
  -D, --define='MACRO EXPR'          define MACRO with value EXPR
      --undefine=MACRO               undefine MACRO
  -E, --eval='EXPR'                  print macro expansion of EXPR
      --target=CPU-VENDOR-OS         Specify target platform
      --macros=<FILE:...>            read <FILE:...> instead of default file(s)
      --noplugins                    don't enable any plugins
      --nodigest                     don't verify package digest(s)
      --nosignature                  don't verify package signature(s)
      --rcfile=<FILE:...>            read <FILE:...> instead of default file(s)
  -r, --root=ROOT                    use ROOT as top level directory (default:
                                     "/")
      --dbpath=DIRECTORY             use database in DIRECTORY
      --querytags                    display known query tags
      --showrc                       display final rpmrc and macro
                                     configuration
      --quiet                        provide less detailed output
  -v, --verbose                      provide more detailed output
      --version                      print the version of rpm being used
 
Options implemented via popt alias/exec:
      --scripts                      list install/erase scriptlets from
                                     package(s)
      --setperms                     set permissions of files in a package
      --setugids                     set user/group ownership of files in a
                                     package
      --setcaps                      set capabilities of files in a package
      --restore                      restore file/directory permissions
      --conflicts                    list capabilities this package conflicts
                                     with
      --obsoletes                    list other packages removed by installing
                                     this package
      --provides                     list capabilities that this package
                                     provides
      --requires                     list capabilities required by package(s)
      --recommends                   list capabilities recommended by
                                     package(s)
      --suggests                     list capabilities suggested by package(s)
      --supplements                  list capabilities supplemented by
                                     package(s)
      --enhances                     list capabilities enhanced by package(s)
      --info                         list descriptive information from
                                     package(s)
      --changelog                    list change logs for this package
      --changes                      list changes for this package with full
                                     time stamps
      --xml                          list metadata in xml
      --triggers                     list trigger scriptlets from package(s)
      --filetriggers                 list filetrigger scriptlets from
                                     package(s)
      --last                         list package(s) by install time, most
                                     recent first
      --dupes                        list duplicated packages
      --filesbypkg                   list all files from each package
      --fileclass                    list file names with their classes
      --filecolor                    list file names with their colors
      --fileprovide                  list file names with their provides
      --filerequire                  list file names with requires
      --filecaps                     list file names with their POSIX1.e
                                     capabilities
 
Help options:
  -?, --help                         Show this help message
      --usage                        Display brief usage message

+

  • codex:: 2026-06-20 rpm 페이지를 표준 CLI 형식으로 재구성하고 조회/설치/검증 예제를 보강함.
  • /home/u613600155/domains/cli.zerotymer.net/public_html/data/pages/rpm.txt
  • 마지막으로 수정됨: 2026/06/20 10:34
  • (바깥 편집)