- /boot is 100% full, apt-get purge linux-image-x.x.x.x-generic won't work
- 우분투(ubuntu) 부팅 공간 확보 :: 살만한 세상 만들기
- Remove all packages marked as rc by dpkg
- 패키지가 제거는 되었지만 설정이 남아 있는 경우
/boot 용량문제
### /boot 용량확인
df -h
Filesystem Size Used Avail Use% Mounted on
....
/dev/sda1 228M 223M 0 100% /boot
....
### /boot 용량확인
du -sh /boot
223M /boot
### /boot 관련 dpkg 확인
# dpkg -l "linux*"
dpkg -l | grep "linux.*imag.*"
... 설치된 linux-headers, linux-image 목록이 나온다.
# rc : r 패키지 제거됨, c 설정파일은 존재함.
# 상태가 rc 인 패키지 설정제거
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
### 현재 사용중인 이미지를 확인 한다. 필요하다면 grub를 이용해서 설치된 이미지로 부팅한다.
uname -r
4.4.0-57-generic
### 일단 청소
apt autoclean && apt autoremove
### 이건 해보지 않음.. ^^;;;
# byobu 설치
apt install byobu.
# 이전 커널 제거
purge-old-kernels
### 수동 패키지 제거
apt-get purge linux-image-4.4.0-21-generic && update-grub.
# 리부팅 후 force 설치
apt-get -f install
apt update && apt full-upgrade.
# 최신 커널로 재부팅후, 이전 커널 제거
### dpkg 방법
# 터미널에서 최신커널이전 삭제
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge
# 리부팅 후 패키지 설치
apt-get -f install
apt update && apt full-upgrade
apt autoclean && apt autoremove
purge_old_kernels
dpkg
dpkg --help
사용법: dpkg [<옵션> ...] <명령>
Commands:
-i|--install <.deb file name> ... | -R|--recursive <directory> ...
--unpack <.deb file name> ... | -R|--recursive <directory> ...
-A|--record-avail <.deb file name> ... | -R|--recursive <directory> ...
--configure <package> ... | -a|--pending
--triggers-only <package> ... | -a|--pending
-r|--remove <package> ... | -a|--pending
-P|--purge <package> ... | -a|--pending
-V|--verify <package> ... Verify the integrity of package(s).
--get-selections [<pattern> ...] Get list of selections to stdout.
--set-selections Set package selections from stdin.
--clear-selections Deselect every non-essential package.
--update-avail [<Packages-file>] Replace available packages info.
--merge-avail [<Packages-file>] Merge with info from file.
--clear-avail Erase existing available info.
--forget-old-unavail Forget uninstalled unavailable pkgs.
-s|--status <package> ... Display package status details.
-p|--print-avail <package> ... Display available version details.
-L|--listfiles <package> ... List files 'owned' by package(s).
-l|--list [<pattern> ...] List packages concisely.
-S|--search <pattern> ... Find package(s) owning file(s).
-C|--audit [<package> ...] Check for broken package(s).
--yet-to-unpack Print packages selected for installation.
--predep-package Print pre-dependencies to unpack.
--add-architecture <arch> Add <arch> to the list of architectures.
--remove-architecture <arch> Remove <arch> from the list of architectures.
--print-architecture Print dpkg architecture.
--print-foreign-architectures Print allowed foreign architectures.
--assert-<feature> Assert support for the specified feature.
--compare-versions <a> <op> <b> Compare version numbers - see below.
--force-help Show help on forcing.
-Dh|--debug=help Show help on debugging.
-?, --help Show this help message.
--version Show the version.
Assertable features: support-predepends, working-epoch, long-filenames,
multi-conrep, multi-arch, versioned-provides.
Use dpkg with -b, --build, -c, --contents, -e, --control, -I, --info,
-f, --field, -x, --extract, -X, --vextract, --ctrl-tarfile, --fsys-tarfile
on archives (type dpkg-deb --help).
Options:
--admindir=<directory> Use <directory> instead of /var/lib/dpkg.
--root=<directory> Install on a different root directory.
--instdir=<directory> Change installation dir without changing admin dir.
--path-exclude=<pattern> Do not install paths which match a shell pattern.
--path-include=<pattern> Re-include a pattern after a previous exclusion.
-O|--selected-only Skip packages not selected for install/upgrade.
-E|--skip-same-version Skip packages whose same version is installed.
-G|--refuse-downgrade Skip packages with earlier version than installed.
-B|--auto-deconfigure Install even if it would break some other package.
--[no-]triggers Skip or force consequential trigger processing.
--verify-format=<format> Verify output format (supported: 'rpm').
--no-debsig Do not try to verify package signatures.
--no-act|--dry-run|--simulate
Just say what we would do - don't do it.
-D|--debug=<octal> Enable debugging (see -Dhelp or --debug=help).
--status-fd <n> Send status change updates to file descriptor <n>.
--status-logger=<command> Send status change updates to <command>'s stdin.
--log=<filename> Log status changes and actions to <filename>.
--ignore-depends=<package>,...
Ignore dependencies involving <package>.
--force-... Override problems (see --force-help).
--no-force-...|--refuse-...
Stop when problems encountered.
--abort-after <n> Abort after encountering <n> errors.
--compare-versions에서 사용하는 비교 연산자:
lt le eq ne ge gt (버전이 없는 경우 항상 이전 버전으로 취급)
lt-nl le-nl ge-nl gt-nl (버전이 없는 경우 항상 이후 버전으로 취급)
< << <= = >= >> > (control 파일의 형식과의 호환성을 위해서만 사용).
Use 'apt' or 'aptitude' for user-friendly package management.
State Info
First letter -> desired package state ("selection state"):
u ... unknown
i ... install
r ... remove/deinstall
p ... purge (remove including config files)
h ... hold
Second letter -> current package state:
n ... not-installed
i ... installed
c ... config-files (only the config files are installed)
u ... unpacked
f ... half-configured (configuration failed for some reason)
h ... half-installed (installation failed for some reason)
w ... triggers-awaited (package is waiting for a trigger from another package)
t ... triggers-pending (package has been triggered)
Third letter -> error state (you normally shouldn't see a thrid letter):
r ... reinst-required (package broken, reinstallation required)
반응형
'os > Ubuntu' 카테고리의 다른 글
cannot create temp file for here-document: No space left on device (0) | 2019.04.05 |
---|---|
ubuntu locale ko_KR.UTF-8 (0) | 2019.02.13 |
apt update xxxx-xxxx.ucf-dist 파일 에러 (0) | 2018.08.14 |
Linux/Ubuntu Destkop Menu (0) | 2018.04.05 |
resolv.conf 그런 파일이나 디렉토리가 없다. (0) | 2017.07.28 |