场景: 某个命令找不到(不要直接apt install)
- 使用
locate
命令查找命令
locate gfortran
/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/bin/pgfortran
/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/man/cat1/pgfortran.1
/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/man/man1/pgfortran.1
/usr/bin/gfortran-10
/usr/bin/x86_64-linux-gnu-gfortran-10
/usr/lib/gcc/x86_64-linux-gnu/10/libgfortran.a
/usr/lib/gcc/x86_64-linux-gnu/10/libgfortran.so
/usr/lib/gcc/x86_64-linux-gnu/10/libgfortran.spec
/usr/lib/x86_64-linux-gnu/libgfortran.so.5
/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0
/usr/share/bash-completion/completions/gfortran
/usr/share/bash-completion/completions/gfortran-5
/usr/share/bash-completion/completions/gfortran-6
/usr/share/bash-completion/completions/gfortran-7
/usr/share/bash-completion/completions/gfortran-8
/usr/share/doc/gfortran-10
/usr/share/doc/libgfortran-10-dev
/usr/share/doc/libgfortran5
/usr/share/lintian/overrides/gfortran-10
/usr/share/man/man1/gfortran-10.1.gz
/usr/share/man/man1/x86_64-linux-gnu-gfortran-10.1.gz
/usr/share/vim/vim81/compiler/gfortran.vim
/var/cache/apt/archives/gfortran-10_10.5.0-1ubuntu1~20.04_amd64.deb
/var/cache/apt/archives/libgfortran-10-dev_10.5.0-1ubuntu1~20.04_amd64.deb
/var/cache/apt/archives/libgfortran5_10.5.0-1ubuntu1~20.04_amd64.deb
/var/lib/dpkg/info/gfortran-10.list
/var/lib/dpkg/info/gfortran-10.md5sums
/var/lib/dpkg/info/libgfortran-10-dev:amd64.list
/var/lib/dpkg/info/libgfortran-10-dev:amd64.md5sums
/var/lib/dpkg/info/libgfortran5:amd64.list
/var/lib/dpkg/info/libgfortran5:amd64.md5sums
/var/lib/dpkg/info/libgfortran5:amd64.shlibs
/var/lib/dpkg/info/libgfortran5:amd64.symbols
/var/lib/dpkg/info/libgfortran5:amd64.triggers
- 找到
/var/lib/dpkg/info/gfortran-10.list
这种list后缀的文件 - 删除时:dpkg 会读取 .list 文件中列出的所有文件,以确保删除了所有与该软件包相关的文件。
- 更新时:系统可以对比文件列表,决定哪些文件需要更新。
- 检查时:用户可以查看某个包安装了哪些文件以及它们的位置