dpkg: too many errors, stopping

cregory

New Member
Joined
Jul 25, 2023
Messages
26
Reaction score
2
Credits
706
please help all i seem to be doing is running in circles

sudo apt-get clean && apt-get update && apt-get upgrade
Hit:2 http://kali.download/kali kali-rolling InRelease
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://ftp.us.debian.org/debian sid InRelease
Hit:6 https://linux.teamviewer.com/deb stable InRelease
Hit:1 http://mirrors.jevincanders.net/kali kali-bleeding-edge InRelease
Hit:3 http://mirrors.jevincanders.net/kali kali-experimental InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
kali-desktop-base libhttp-cookiejar-perl python3-cryptography37
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-6.1.0-kali7-amd64
The following packages have been kept back:
driftnet gnuradio gnuradio-dev linux-image-amd64 ruby-celluloid spike
The following packages will be upgraded:
aapt adb amass amass-common android-framework-res android-libaapt
android-libandroidfw android-libbacktrace android-libbase
android-libboringssl android-libcutils android-liblog android-libsparse
android-libutils android-libziparchive bpftool certipy-ad desktop-base
dmtracedump dpuser-doc etc1tool fastboot ghidra ghidra-data gir1.2-gtk-3.0
gnome-terminal gnome-terminal-data gtk-update-icon-cache gvm-tools
hprof-conv ipython3 libcpupower1 libcrypt-dev libcrypt1 libdv4 libgail-3-0
libglib2.0-0 libglib2.0-bin libglib2.0-data libgoa-1.0-0b libgoa-1.0-common
libgtk-3-0 libgtk-3-bin libgtk-3-common libkpathsea6 libncurses-dev
libncurses6 libncursesw6 libnfsidmap1 libnss-systemd libpam-systemd
libpcap-dev libpcap0.8 libpcap0.8-dev libpipewire-0.3-0
libpipewire-0.3-modules libptexenc1 libqscintilla2-qt5-15
libqscintilla2-qt5-l10n libqt6core6 libqt6dbus6 libqt6gui6 libqt6network6
libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6 libqt6qml6
libqt6qmlmodels6 libqt6quick6 libqt6sql6 libqt6sql6-sqlite libqt6test6
libqt6widgets6 libqt6xml6 libraw23 libspa-0.2-bluetooth libspa-0.2-modules
libsynctex2 libsystemd-shared libsystemd0 libtexlua53-5 libtexluajit2
libtinfo6 libudev1 libudisks2-0 libwww-perl libxs-parse-keyword-perl
linux-libc-dev man-db menu nautilus-extension-gnome-terminal ncurses-base
ncurses-bin ncurses-term nfs-common node-terser ovmf pipewire pipewire-bin
pipewire-pulse pybind11-dev pyqt6-dev-tools python3-charset-normalizer
python3-fastapi python3-gi python3-gi-cairo python3-gvm python3-ipython
python3-pluggy python3-pyqt5.qsci python3-pyqt5.sip python3-pyqt6
python3-pyqt6.sip python3-setproctitle python3-typing-extensions
python3-yaml qemu-block-extra qemu-system-common qemu-system-data
qemu-system-gui qemu-system-x86 qemu-user qemu-user-binfmt qemu-utils
qfitsview qt6-base-dev-tools qt6-gtk-platformtheme qt6-qpa-plugins
slimtoolkit split-select syft systemd systemd-coredump systemd-dev
systemd-sysv systemd-timesyncd tcpdump terraform terser tetragon
texlive-binaries udev udisks2 uwsgi-core uwsgi-plugin-python3 whois
146 upgraded, 0 newly installed, 1 to remove and 6 not upgraded.
4 not fully installed or removed.
Need to get 575 MB of archives.
After this operation, 466 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://kali.download/kali kali-rolling/main amd64 amass amd64 4.0.1-0kali1 [16.0 MB]
Get:2 http://ftp.us.debian.org/debian sid/main amd64 ncurses-bin amd64 6.4+20230625-2 [426 kB]
Get:3 http://ftp.us.debian.org/debian sid/main amd64 ncurses-base all 6.4+20230625-2 [265 kB]
Get:4 http://ftp.us.debian.org/debian sid/main amd64 ncurses-term all 6.4+20230625-2 [505 kB]
Get:5 http://ftp.us.debian.org/debian sid/main amd64 libnss-systemd amd64 254~rc3-3 [176 kB]
Get:6 http://ftp.us.debian.org/debian sid/main amd64 systemd-coredump amd64 254~rc3-3 [98.6 kB]
Get:7 http://ftp.us.debian.org/debian sid/main amd64 libcrypt-dev amd64 1:4.4.36-1 [118 kB]
Get:8 http://ftp.us.debian.org/debian sid/main amd64 libcrypt1 amd64 1:4.4.36-1 [89.7 kB]
Get:9 http://ftp.us.debian.org/debian sid/main amd64 systemd-timesyncd amd64 254~rc3-3 [65.9 kB]
Get:10 http://ftp.us.debian.org/debian sid/main amd64 systemd-dev all 254~rc3-3 [39.1 kB]
Get:11 http://ftp.us.debian.org/debian sid/main amd64 libpam-systemd amd64 254~rc3-3 [241 kB]
Get:12 http://ftp.us.debian.org/debian sid/main amd64 systemd amd64 254~rc3-3 [3,249 kB]
Get:13 http://ftp.us.debian.org/debian sid/main amd64 libsystemd-shared amd64 254~rc3-3 [1,835 kB]
Get:14 http://ftp.us.debian.org/debian sid/main amd64 systemd-sysv amd64 254~rc3-3 [43.9 kB]
Get:15 http://ftp.us.debian.org/debian sid/main amd64 libsystemd0 amd64 254~rc3-3 [354 kB]
Get:16 http://ftp.us.debian.org/debian sid/main amd64 nfs-common amd64 1:2.6.3-2 [262 kB]
Get:17 http://ftp.us.debian.org/debian sid/main amd64 libnfsidmap1 amd64 1:2.6.3-2 [55.3 kB]
Get:18 http://ftp.us.debian.org/debian sid/main amd64 libncurses-dev amd64 6.4+20230625-2 [347 kB]
Get:19 http://ftp.us.debian.org/debian sid/main amd64 libncurses6 amd64 6.4+20230625-2 [103 kB]
Get:20 http://ftp.us.debian.org/debian sid/main amd64 libncursesw6 amd64 6.4+20230625-2 [134 kB]
Get:21 http://ftp.us.debian.org/debian sid/main amd64 libtinfo6 amd64 6.4+20230625-2 [339 kB]
Get:22 http://ftp.us.debian.org/debian sid/main amd64 udev amd64 254~rc3-3 [1,750 kB]
Get:23 http://kali.download/kali kali-rolling/main amd64 amass-common all 4.0.1-0kali1 [1,802 kB]
Get:24 http://kali.download/kali kali-rolling/main amd64 certipy-ad all 4.7.0-0kali3 [93.2 kB]
Get:25 http://kali.download/kali kali-rolling/main amd64 ghidra amd64 10.3.2-0kali1 [301 MB]
Get:26 http://ftp.us.debian.org/debian sid/main amd64 libudev1 amd64 254~rc3-3 [117 kB]
Get:27 http://ftp.us.debian.org/debian sid/main amd64 man-db amd64 2.11.2-3 [1,386 kB]
Get:28 http://ftp.us.debian.org/debian sid/main amd64 android-libboringssl amd64 13.0.0+r24-3 [675 kB]
Get:29 http://ftp.us.debian.org/debian sid/main amd64 android-libutils amd64 1:33.0.3-2 [57.5 kB]
Get:30 http://ftp.us.debian.org/debian sid/main amd64 android-libbacktrace amd64 1:33.0.3-2 [233 kB]
Get:31 http://ftp.us.debian.org/debian sid/main amd64 fastboot amd64 1:33.0.3-2 [164 kB]
Get:32 http://ftp.us.debian.org/debian sid/main amd64 android-libziparchive amd64 1:33.0.3-2 [46.8 kB]
Get:33 http://ftp.us.debian.org/debian sid/main amd64 android-libsparse amd64 1:33.0.3-2 [33.8 kB]
Get:34 http://ftp.us.debian.org/debian sid/main amd64 adb amd64 1:33.0.3-2 [268 kB]
Get:35 http://ftp.us.debian.org/debian sid/main amd64 android-libcutils amd64 1:33.0.3-2 [38.9 kB]
Get:36 http://ftp.us.debian.org/debian sid/main amd64 android-libbase amd64 1:33.0.3-2 [99.5 kB]
Get:37 http://ftp.us.debian.org/debian sid/main amd64 android-liblog amd64 1:33.0.3-2 [38.2 kB]
Get:38 http://ftp.us.debian.org/debian sid/main amd64 android-libandroidfw amd64 1:13.0.0+r30-1 [173 kB]
Get:39 http://ftp.us.debian.org/debian sid/main amd64 android-libaapt amd64 1:13.0.0+r30-1 [884 kB]
Get:40 http://ftp.us.debian.org/debian sid/main amd64 aapt amd64 1:13.0.0+r30-1 [39.4 kB]
Get:41 http://ftp.us.debian.org/debian sid/main amd64 android-framework-res all 1:13.0.0+r30-1 [18.7 MB]
Get:42 http://ftp.us.debian.org/debian sid/main amd64 bpftool amd64 7.2.0+6.4.4-1 [899 kB]
Get:43 http://ftp.us.debian.org/debian sid/main amd64 desktop-base all 12.0.6+nmu1 [7,867 kB]
Get:44 http://ftp.us.debian.org/debian sid/main amd64 dmtracedump amd64 1:13.0.0+r63-2 [27.5 kB]
Get:45 http://ftp.us.debian.org/debian sid/main amd64 dpuser-doc all 4.1+dfsg-2 [894 kB]
Get:46 http://ftp.us.debian.org/debian sid/main amd64 etc1tool amd64 33.0.3-2 [29.9 kB]
Get:47 http://ftp.us.debian.org/debian sid/main amd64 libglib2.0-data all 2.76.4-4 [1,214 kB]
Get:48 http://ftp.us.debian.org/debian sid/main amd64 libglib2.0-bin amd64 2.76.4-4 [113 kB]
Get:49 http://ftp.us.debian.org/debian sid/main amd64 libglib2.0-0 amd64 2.76.4-4 [1,433 kB]
Get:50 http://ftp.us.debian.org/debian sid/main amd64 libgail-3-0 amd64 3.24.38-2 [40.5 kB]
Get:51 http://ftp.us.debian.org/debian sid/main amd64 libgtk-3-common all 3.24.38-2 [3,893 kB]
Get:52 http://ftp.us.debian.org/debian sid/main amd64 libgtk-3-0 amd64 3.24.38-2 [2,710 kB]
Get:53 http://ftp.us.debian.org/debian sid/main amd64 gir1.2-gtk-3.0 amd64 3.24.38-2 [219 kB]
Get:54 http://ftp.us.debian.org/debian sid/main amd64 nautilus-extension-gnome-terminal amd64 3.48.1-2 [29.6 kB]
Get:55 http://ftp.us.debian.org/debian sid/main amd64 gnome-terminal amd64 3.48.1-2 [222 kB]
Get:56 http://ftp.us.debian.org/debian sid/main amd64 gnome-terminal-data all 3.48.1-2 [965 kB]
Get:57 http://ftp.us.debian.org/debian sid/main amd64 gtk-update-icon-cache amd64 3.24.38-2 [43.7 kB]
Get:58 http://ftp.us.debian.org/debian sid/main amd64 hprof-conv amd64 33.0.3-2 [23.2 kB]
Get:59 http://ftp.us.debian.org/debian sid/main amd64 python3-typing-extensions all 4.7.1-1 [62.4 kB]
Get:60 http://ftp.us.debian.org/debian sid/main amd64 ipython3 all 8.14.0-1 [29.6 kB]
Get:61 http://ftp.us.debian.org/debian sid/main amd64 python3-ipython all 8.14.0-1 [557 kB]
Get:62 http://ftp.us.debian.org/debian sid/main amd64 libcpupower1 amd64 6.4.4-1 [654 kB]
Get:63 http://ftp.us.debian.org/debian sid/main amd64 libdv4 amd64 1.0.0-16 [70.3 kB]
Get:64 http://ftp.us.debian.org/debian sid/main amd64 libgoa-1.0-common all 3.48.0-2 [170 kB]
Get:65 http://ftp.us.debian.org/debian sid/main amd64 libgoa-1.0-0b amd64 3.48.0-2 [60.6 kB]
Get:66 http://ftp.us.debian.org/debian sid/main amd64 libgtk-3-bin amd64 3.24.38-2 [81.8 kB]
Get:67 http://ftp.us.debian.org/debian sid/main amd64 texlive-binaries amd64 2022.20220321.62855-8 [10.5 MB]
Get:68 http://ftp.us.debian.org/debian sid/main amd64 libptexenc1 amd64 2022.20220321.62855-8 [44.0 kB]
Get:69 http://ftp.us.debian.org/debian sid/main amd64 libsynctex2 amd64 2022.20220321.62855-8 [59.9 kB]
Get:70 http://ftp.us.debian.org/debian sid/main amd64 libtexlua53-5 amd64 2022.20220321.62855-8 [111 kB]
Get:71 http://ftp.us.debian.org/debian sid/main amd64 libtexluajit2 amd64 2022.20220321.62855-8 [247 kB]
Get:72 http://ftp.us.debian.org/debian sid/main amd64 libkpathsea6 amd64 2022.20220321.62855-8 [152 kB]
Get:73 http://ftp.us.debian.org/debian sid/main amd64 libpcap0.8-dev amd64 1.10.4-3 [276 kB]
Get:74 http://ftp.us.debian.org/debian sid/main amd64 libpcap0.8 amd64 1.10.4-3 [163 kB]
Get:75 http://ftp.us.debian.org/debian sid/main amd64 libpcap-dev amd64 1.10.4-3 [28.6 kB]
Get:76 http://ftp.us.debian.org/debian sid/main amd64 libspa-0.2-bluetooth amd64 0.3.74-1+b1 [349 kB]
Get:77 http://ftp.us.debian.org/debian sid/main amd64 pipewire-pulse amd64 0.3.74-1+b1 [20.5 kB]
Get:78 http://ftp.us.debian.org/debian sid/main amd64 libpipewire-0.3-modules amd64 0.3.74-1+b1 [702 kB]
Get:79 http://ftp.us.debian.org/debian sid/main amd64 pipewire amd64 0.3.74-1+b1 [91.7 kB]
Get:80 http://ftp.us.debian.org/debian sid/main amd64 pipewire-bin amd64 0.3.74-1+b1 [326 kB]
Get:81 http://ftp.us.debian.org/debian sid/main amd64 libpipewire-0.3-0 amd64 0.3.74-1+b1 [254 kB]
Get:82 http://ftp.us.debian.org/debian sid/main amd64 libspa-0.2-modules amd64 0.3.74-1+b1 [584 kB]
Get:83 http://ftp.us.debian.org/debian sid/main amd64 libqscintilla2-qt5-l10n all 2.14.1+dfsg-1 [105 kB]
Get:84 http://ftp.us.debian.org/debian sid/main amd64 libqscintilla2-qt5-15 amd64 2.14.1+dfsg-1 [1,116 kB]
Get:85 http://ftp.us.debian.org/debian sid/main amd64 libqt6core6 amd64 6.4.2+dfsg-16 [1,626 kB]
Get:86 http://ftp.us.debian.org/debian sid/main amd64 libqt6dbus6 amd64 6.4.2+dfsg-16 [249 kB]
Get:87 http://ftp.us.debian.org/debian sid/main amd64 libqt6network6 amd64 6.4.2+dfsg-16 [682 kB]
Get:88 http://ftp.us.debian.org/debian sid/main amd64 libqt6gui6 amd64 6.4.2+dfsg-16 [2,857 kB]
Get:89 http://ftp.us.debian.org/debian sid/main amd64 qt6-qpa-plugins amd64 6.4.2+dfsg-16 [88.6 kB]
Get:90 http://ftp.us.debian.org/debian sid/main amd64 libqt6opengl6 amd64 6.4.2+dfsg-16 [390 kB]
Get:91 http://ftp.us.debian.org/debian sid/main amd64 libqt6widgets6 amd64 6.4.2+dfsg-16 [2,446 kB]
Get:92 http://ftp.us.debian.org/debian sid/main amd64 libqt6openglwidgets6 amd64 6.4.2+dfsg-16 [43.9 kB]
Get:93 http://ftp.us.debian.org/debian sid/main amd64 libqt6printsupport6 amd64 6.4.2+dfsg-16 [212 kB]
Get:94 http://ftp.us.debian.org/debian sid/main amd64 libqt6qml6 amd64 6.4.2+dfsg-3 [1,481 kB]
Get:95 http://ftp.us.debian.org/debian sid/main amd64 libqt6qmlmodels6 amd64 6.4.2+dfsg-3 [245 kB]
Get:96 http://ftp.us.debian.org/debian sid/main amd64 libqt6quick6 amd64 6.4.2+dfsg-3 [1,810 kB]
Get:97 http://ftp.us.debian.org/debian sid/main amd64 libqt6sql6 amd64 6.4.2+dfsg-16 [135 kB]
Get:98 http://ftp.us.debian.org/debian sid/main amd64 libqt6sql6-sqlite amd64 6.4.2+dfsg-16 [59.7 kB]
Get:99 http://ftp.us.debian.org/debian sid/main amd64 libqt6test6 amd64 6.4.2+dfsg-16 [163 kB]
Get:100 http://ftp.us.debian.org/debian sid/main amd64 libqt6xml6 amd64 6.4.2+dfsg-16 [76.7 kB]
Get:101 http://ftp.us.debian.org/debian sid/main amd64 libraw23 amd64 0.21.1-7 [386 kB]
Get:102 http://ftp.us.debian.org/debian sid/main amd64 udisks2 amd64 2.10.0-4 [440 kB]
Get:103 http://ftp.us.debian.org/debian sid/main amd64 libudisks2-0 amd64 2.10.0-4 [147 kB]
Get:104 http://ftp.us.debian.org/debian sid/main amd64 libwww-perl all 6.72-1 [187 kB]
Get:105 http://ftp.us.debian.org/debian sid/main amd64 libxs-parse-keyword-perl amd64 0.36-1 [59.0 kB]
Get:106 http://ftp.us.debian.org/debian sid/main amd64 linux-libc-dev amd64 6.4.4-1 [1,797 kB]
Get:107 http://ftp.us.debian.org/debian sid/main amd64 menu amd64 2.1.50 [346 kB]
Get:108 http://ftp.us.debian.org/debian sid/main amd64 terser all 5.19.2-1 [17.5 kB]
Get:109 http://ftp.us.debian.org/debian sid/main amd64 node-terser all 5.19.2-1 [208 kB]
Get:110 http://ftp.us.debian.org/debian sid/main amd64 ovmf all 2023.05-1 [7,734 kB]
Get:111 http://ftp.us.debian.org/debian sid/main amd64 pybind11-dev all 2.11.1-1 [191 kB]
Get:112 http://ftp.us.debian.org/debian sid/main amd64 python3-pyqt6.sip amd64 13.5.2-1 [51.3 kB]
Get:113 http://ftp.us.debian.org/debian sid/main amd64 python3-pyqt6 amd64 6.5.2-1 [2,464 kB]
Get:114 http://ftp.us.debian.org/debian sid/main amd64 pyqt6-dev-tools all 6.5.2-1 [68.6 kB]
Get:115 http://ftp.us.debian.org/debian sid/main amd64 python3-charset-normalizer all 3.2.0-1 [50.7 kB]
Get:116 http://ftp.us.debian.org/debian sid/main amd64 python3-fastapi all 0.100.0-1 [56.9 kB]
Get:117 http://ftp.us.debian.org/debian sid/main amd64 python3-gi-cairo amd64 3.44.1-2 [11.6 kB]
Get:118 http://ftp.us.debian.org/debian sid/main amd64 python3-gi amd64 3.44.1-2 [220 kB]
Get:119 http://ftp.us.debian.org/debian sid/main amd64 python3-pluggy all 1.2.0-1 [24.2 kB]
Get:120 http://ftp.us.debian.org/debian sid/main amd64 python3-pyqt5.sip amd64 12.12.2-1 [56.4 kB]
Get:121 http://ftp.us.debian.org/debian sid/main amd64 python3-pyqt5.qsci amd64 2.14.1+dfsg-1 [307 kB]
Get:122 http://ftp.us.debian.org/debian sid/main amd64 python3-setproctitle amd64 1.3.2-1 [17.8 kB]
Get:123 http://ftp.us.debian.org/debian sid/main amd64 python3-yaml amd64 6.0.1-1 [119 kB]
Get:124 http://ftp.us.debian.org/debian sid/main amd64 qemu-system-gui amd64 1:8.0.3+dfsg-3 [305 kB]
Get:125 http://ftp.us.debian.org/debian sid/main amd64 qemu-block-extra amd64 1:8.0.3+dfsg-3 [92.0 kB]
Get:126 http://ftp.us.debian.org/debian sid/main amd64 qemu-utils amd64 1:8.0.3+dfsg-3 [1,758 kB]
Get:127 http://ftp.us.debian.org/debian sid/main amd64 qemu-system-x86 amd64 1:8.0.3+dfsg-3 [9,544 kB]
Get:128 http://ftp.us.debian.org/debian sid/main amd64 qemu-system-common amd64 1:8.0.3+dfsg-3 [1,213 kB]
Get:129 http://ftp.us.debian.org/debian sid/main amd64 qemu-system-data all 1:8.0.3+dfsg-3 [1,541 kB]
Get:130 http://ftp.us.debian.org/debian sid/main amd64 qemu-user-binfmt amd64 1:8.0.3+dfsg-3 [3,740 B]
Get:131 http://ftp.us.debian.org/debian sid/main amd64 qemu-user amd64 1:8.0.3+dfsg-3 [13.5 MB]
Get:132 http://ftp.us.debian.org/debian sid/main amd64 qfitsview amd64 4.1+dfsg-2 [2,004 kB]
Get:133 http://ftp.us.debian.org/debian sid/main amd64 qt6-base-dev-tools amd64 6.4.2+dfsg-16 [897 kB]
Get:134 http://ftp.us.debian.org/debian sid/main amd64 qt6-gtk-platformtheme amd64 6.4.2+dfsg-16 [57.1 kB]
Get:135 http://ftp.us.debian.org/debian sid/main amd64 split-select amd64 1:13.0.0+r30-1 [31.5 kB]
Get:136 http://ftp.us.debian.org/debian sid/main amd64 tcpdump amd64 4.99.4-3 [467 kB]
Get:137 http://ftp.us.debian.org/debian sid/main amd64 uwsgi-plugin-python3 amd64 2.0.21-6 [92.1 kB]
Get:138 http://ftp.us.debian.org/debian sid/main amd64 uwsgi-core amd64 2.0.21-6 [543 kB]
Get:139 http://ftp.us.debian.org/debian sid/main amd64 whois amd64 5.5.18 [70.6 kB]
Get:140 http://kali.download/kali kali-rolling/main amd64 ghidra-data all 10.4-0kali1 [78.1 MB]
Get:141 http://kali.download/kali kali-rolling/main amd64 python3-gvm all 23.4.2-0kali1 [59.8 kB]
Get:142 http://kali.download/kali kali-rolling/main amd64 gvm-tools all 23.4.0-0kali2 [147 kB]
Get:143 http://kali.download/kali kali-rolling/main amd64 slimtoolkit amd64 1.40.3-0kali1 [16.6 MB]
Get:144 http://kali.download/kali kali-rolling/main amd64 syft amd64 0.85.0+ds-0kali1 [10.0 MB]
Get:145 http://kali.download/kali kali-rolling/main amd64 terraform amd64 1.5.3-0kali1 [14.2 MB]
Get:146 http://kali.download/kali kali-rolling/main amd64 tetragon amd64 0.10.0-0kali1 [6,707 kB]
Fetched 575 MB in 4min 40s (2,050 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 897532 files and directories currently installed.)
Removing linux-image-6.1.0-kali7-amd64 (6.1.20-2kali1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.1.0-kali7-amd64
/etc/kernel/postrm.d/zz-update-grub:
sudo: update: command not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-6.1.0-kali7-amd64 (--remove):
installed linux-image-6.1.0-kali7-amd64 package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-6.1.0-kali7-amd64
Processing was halted because there were too many errors.
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

┌──(root㉿kali)-[~]
└─#
 


I have tried mulitpul ways to fix this and either it does not fix or causes more errors and seems to have something to do with the headers and also my alpha usb wifi adapter and or the bult in gpu. worst of all all i was trying to do was connect this brothers printer
 
There should be a sudo before each command, that is

sudo apt-get clean && apt-get update && apt-get upgrade
should be

Code:
sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade

See if that works.

Chris Turner
wizardfromoz
 
you are right and yes in the above example i did not but trust me i have tried it every way known at least to my self cant update or up grade or remove the linux package and on one error message a reference to vm appears even though i don't use a vm on this computer kali is the o/s
 
This appears to be the output to be concerned with:
Code:
Removing linux-image-6.1.0-kali7-amd64 (6.1.20-2kali1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.1.0-kali7-amd64
/etc/kernel/postrm.d/zz-update-grub:
sudo: update: command not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-6.1.0-kali7-amd64 (--remove):
installed linux-image-6.1.0-kali7-amd64 package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-6.1.0-kali7-amd64
Processing was halted because there were too many errors.

A few queries:
How many kernels on the machine?
What are the kernel versions on the machine?

What happens if you try and upgrade and update without removing that kernel, or removing any kernel?

This seems odd.
update: command not found
It's unclear why "update" was not found since the output shows that apt-get has updated. I'll leave speculation on that for the moment.

It's likely that the command shown is not the exact command to have produced that output since "sudo" wasn't used for each of the commands on the line.

It's best to supply commands and output exactly and use code tags so that it's entirely clear.

To keep the kernel from being removed you can write a preferences file in /etc/apt/preferences with content that looks like:
Code:
Package: linux-image-6.1.0-kali7-amd64
Pin: version <version>
Pin-Priority: -1

where you replace <version> with the output of: uname -r, and make sure the package name is correct.
 
Last edited:
this is what happened trying to list kernels i also tried rpm and yum commands

──(root㉿kali)-[/home/mastervenger]
└─# dnf list installed kernel
Command 'dnf' not found, but can be installed with:
apt install dnf
Do you want to install it? (N/y)y
apt install dnf
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
deltarpm dnf-data libcomps0 libdnf2 libdnf2-common libmodulemd2 librepo0
libsolv1 libsolvext1 python3-dnf python3-hawkey python3-libcomps
python3-libdnf python3-rpm python3-unbound
Suggested packages:
python3-dnf-doc python3-hawkey-docs python-libcomps-doc
The following packages will be REMOVED:
linux-image-6.1.0-kali7-amd64
The following NEW packages will be installed:
deltarpm dnf dnf-data libcomps0 libdnf2 libdnf2-common libmodulemd2 librepo0
libsolv1 libsolvext1 python3-dnf python3-hawkey python3-libcomps
python3-libdnf python3-rpm python3-unbound
0 upgraded, 16 newly installed, 1 to remove and 166 not upgraded.
4 not fully installed or removed.
Need to get 4,536 kB of archives.
After this operation, 498 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://kali.download/kali kali-rolling/main amd64 deltarpm amd64 3.6.3+dfsg-2+b3 [121 kB]
Get:2 http://kali.download/kali kali-rolling/main amd64 dnf-data all 4.14.0-4 [389 kB]
Get:3 http://kali.download/kali kali-rolling/main amd64 libmodulemd2 amd64 2.14.0-3 [141 kB]
Get:4 http://kali.download/kali kali-rolling/main amd64 librepo0 amd64 1.14.5-3 [62.8 kB]
Get:5 http://kali.download/kali kali-rolling/main amd64 libsolv1 amd64 0.7.24-1 [290 kB]
Get:6 http://kali.download/kali kali-rolling/main amd64 libsolvext1 amd64 0.7.24-1 [128 kB]
Get:7 http://kali.download/kali kali-rolling/main amd64 libdnf2-common all 0.69.0-2 [77.7 kB]
Get:8 http://kali.download/kali kali-rolling/main amd64 libdnf2 amd64 0.69.0-2 [556 kB]
Get:9 http://kali.download/kali kali-rolling/main amd64 python3-libdnf amd64 0.69.0-2 [620 kB]
Get:10 http://kali.download/kali kali-rolling/main amd64 python3-hawkey amd64 0.69.0-2 [72.7 kB]
Get:11 http://kali.download/kali kali-rolling/main amd64 libcomps0 amd64 0.1.19-2 [56.2 kB]
Get:12 http://kali.download/kali kali-rolling/main amd64 python3-libcomps amd64 0.1.19-2 [36.5 kB]
Get:13 http://kali.download/kali kali-rolling/main amd64 python3-rpm amd64 4.18.0+dfsg-1+b1 [1,583 kB]
Get:14 http://kali.download/kali kali-rolling/main amd64 python3-dnf all 4.14.0-4 [161 kB]
Get:15 http://kali.download/kali kali-rolling/main amd64 dnf all 4.14.0-4 [39.1 kB]
Get:16 http://kali.download/kali kali-rolling/main amd64 python3-unbound amd64 1.17.1-2 [202 kB]
Fetched 4,536 kB in 2s (2,192 kB/s)
(Reading database ... 897532 files and directories currently installed.)
Removing linux-image-6.1.0-kali7-amd64 (6.1.20-2kali1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.1.0-kali7-amd64
/etc/kernel/postrm.d/zz-update-grub:
sudo: update: command not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-6.1.0-kali7-amd64 (--remove):
installed linux-image-6.1.0-kali7-amd64 package post-removal script subprocess
returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-6.1.0-kali7-amd64
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

┌──(root㉿kali)-[/home/mastervenger]
└─# dnf list installed kernel
Command 'dnf' not found, but can be installed with:
apt install dnf
Do you want to install it? (N/y)
 
when i use unsme -r
6.1.0-kali9-amd64

when i use uname -a
inux kali 6.1.0-kali9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1kali2 (2023-05-31) x86_64 GNU/Linux

i don't know how to use
Package: linux-image-6.1.0-kali7-amd64
Pin: version <version>
Pin-Priority: -1
 
You could try, as root, to navigate to the directory: /etc/apt.
Create a file with a text editor, (such as nano), in that directory named: preferences.
Inside that file write the following code (excluding the coloured word "Code:"):
Code:
Package: linux-image-6.1.0-kali7-amd64
Pin: version 6.1.0-kali9-amd64
Pin-Priority: -1

Save the file. Next time you run apt, it should keep the named kernel that is now "pinned".
There's lots of info on pinning, and usage of apt online and in the manpages.
It's a learning curve, but once you get the hang of things, it's a beautiful ship to sail in.

If by chance the above does not work, then it's likely a matter of the names in the first two lines that you have to get correctly entered, which will be determinable from your machine.

If by chance you are not familiar at all with writing files and using a text editor like nano, then learning those is a good way to start since they can be critically important tools for dealing with problems such as the one you are presenting. Sorry if this is redundant information, but it may be helpful.
 
You could try, as root, to navigate to the directory: /etc/apt.
Create a file with a text editor, (such as nano), in that directory named: preferences.
Inside that file write the following code (excluding the coloured word "Code:"):
Code:
Package: linux-image-6.1.0-kali7-amd64
Pin: version 6.1.0-kali9-amd64
Pin-Priority: -1

Save the file. Next time you run apt, it should keep the named kernel that is now "pinned".
There's lots of info on pinning, and usage of apt online and in the manpages.
It's a learning curve, but once you get the hang of things, it's a beautiful ship to sail in.

If by chance the above does not work, then it's likely a matter of the names in the first two lines that you have to get correctly entered, which will be determinable from your machine.

If by chance you are not familiar at all with writing files and using a text editor like nano, then learning those is a good way to start since they can be critically important tools for dealing with problems such as the one you are presenting. Sorry if this is redundant information, but it may be helpful.
No i truly appreciate any help. i have been using linux distros for many years now starting with back trax but also ubuntu kali linux and now i dont even use windows anymore and i have not but should lern vm just for all the possibilities and although i have read that kali should not be used as a primary os idk i just prefer it over like ubuntu and i have like 5 desktops like kde and such oddly i had thought that when i upgraded like the kernel and such it auto removed the previous. but in any case i do truly appreciate any help so thank you i will try this and reply after i do .
 
When installing a new kernel, your old kernel is kept, in case the new one doesn't work properly.
(It will need a reboot to activate it.)

(Also, you might need dist upgrade instead of just upgrade.)

(And, if still having problems, maybe try running apt install --fix-broken)
 
──(root㉿kali)-[~]
└─# apt-get -f purge nvidia-kernel-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'nvidia-kernel-dkms' is not installed, so not removed
The following packages will be REMOVED:
linux-image-6.1.0-kali7-amd64
0 upgraded, 0 newly installed, 1 to remove and 172 not upgraded.
4 not fully installed or removed.
After this operation, 512 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 897532 files and directories currently installed.)
Removing linux-image-6.1.0-kali7-amd64 (6.1.20-2kali1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.1.0-kali7-amd64
/etc/kernel/postrm.d/zz-update-grub:
sudo: update: command not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-6.1.0-kali7-amd64 (--remove):
installed linux-image-6.1.0-kali7-amd64 package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-6.1.0-kali7-amd64
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
└─# sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
kali-desktop-base libhttp-cookiejar-perl python3-cryptography37
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
linux-image-6.1.0-kali7-amd64
The following NEW packages will be installed:
libwebsockets19 linux-image-6.4.0-1-amd64
The following packages have been kept back:
gnuradio gnuradio-dev ruby-celluloid spike
The following packages will be upgraded:
aapt adb amass amass-common android-framework-res android-libaapt android-libandroidfw
android-libbacktrace android-libbase android-libboringssl android-libcutils android-liblog
android-libsparse android-libutils android-libziparchive bettercap bpftool certipy-ad cisco7crack cmake
cmake-data desktop-base dmtracedump dpuser-doc driftnet etc1tool fastboot ghidra ghidra-data
gir1.2-gtk-3.0 gnome-terminal gnome-terminal-data google-chrome-stable gtk-update-icon-cache gvm-tools
hprof-conv ipython3 libblockdev-crypto3 libblockdev-fs3 libblockdev-loop3 libblockdev-mdraid3
libblockdev-nvme3 libblockdev-part3 libblockdev-swap3 libblockdev-utils3 libblockdev3 libcpupower1
libcrypt-dev libcrypt1 libdv4 libfreexl1 libgail-3-0 libglib2.0-0 libglib2.0-bin libglib2.0-data
libgoa-1.0-0b libgoa-1.0-common libgtk-3-0 libgtk-3-bin libgtk-3-common libkpathsea6 libncurses-dev
libncurses6 libncursesw6 libnfsidmap1 libnss-systemd libpam-systemd libpcap-dev libpcap0.8 libpcap0.8-dev
libpipewire-0.3-0 libpipewire-0.3-modules libptexenc1 libqscintilla2-qt5-15 libqscintilla2-qt5-l10n
libqt6core6 libqt6dbus6 libqt6gui6 libqt6network6 libqt6opengl6 libqt6openglwidgets6 libqt6printsupport6
libqt6qml6 libqt6qmlmodels6 libqt6quick6 libqt6sql6 libqt6sql6-sqlite libqt6test6 libqt6widgets6
libqt6xml6 libraw23 libspa-0.2-bluetooth libspa-0.2-modules libsynctex2 libsystemd-shared libsystemd0
libtexlua53-5 libtexluajit2 libtinfo6 libudev1 libudisks2-0 libwayland-client0 libwayland-cursor0
libwayland-egl1 libwayland-server0 libwww-perl libxs-parse-keyword-perl linux-image-amd64 linux-libc-dev
man-db menu nautilus-extension-gnome-terminal ncurses-base ncurses-bin ncurses-term nfs-common node-terser
ovmf pipewire pipewire-bin pipewire-pulse pybind11-dev pyqt6-dev-tools python3-charset-normalizer
python3-fastapi python3-gi python3-gi-cairo python3-gvm python3-ipython python3-markdown python3-pluggy
python3-pyqt5.qsci python3-pyqt5.sip python3-pyqt6 python3-pyqt6.sip python3-setproctitle
python3-typing-extensions python3-yaml qemu-block-extra qemu-system-common qemu-system-data
qemu-system-gui qemu-system-x86 qemu-user qemu-user-binfmt qemu-utils qfitsview qt6-base-dev-tools
qt6-gtk-platformtheme qt6-qpa-plugins slimtoolkit split-select syft systemd systemd-coredump systemd-dev
systemd-sysv systemd-timesyncd tcpdump terraform terser tetragon texlive-binaries udev udisks2 uwsgi-core
uwsgi-plugin-python3 whois
168 upgraded, 2 newly installed, 1 to remove and 4 not upgraded.
4 not fully installed or removed.
Need to get 218 MB/765 MB of archives.
After this operation, 2,042 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 115.0.5790.110-1 [95
.9 MB]
Get:2 http://ftp.us.debian.org/debian sid/main amd64 linux-image-6.4.0-1-amd64 amd64 6.4.4-1 [74.6 MB]
Get:3 http://ftp.us.debian.org/debian sid/main amd64 linux-image-amd64 amd64 6.4.4-1 [1,472 B]
Get:4 http://ftp.us.debian.org/debian sid/main amd64 libwayland-client0 amd64 1.22.0-2 [25.2 kB]
Get:5 http://ftp.us.debian.org/debian sid/main amd64 libwayland-cursor0 amd64 1.22.0-2 [10.9 kB]
Get:6 http://ftp.us.debian.org/debian sid/main amd64 libwayland-egl1 amd64 1.22.0-2 [5,260 B]
Get:7 http://ftp.us.debian.org/debian sid/main amd64 bettercap amd64 2.32.0-2 [6,874 kB]
Get:8 http://ftp.us.debian.org/debian sid/main amd64 cisco7crack amd64 0.0~git20121221.f1c21dd-3 [7,776 B]
Get:9 http://ftp.us.debian.org/debian sid/main amd64 cmake amd64 3.27.0-2 [10.3 MB]
Get:10 http://ftp.us.debian.org/debian sid/main amd64 cmake-data all 3.27.0-2 [2,102 kB]
Get:11 http://ftp.us.debian.org/debian sid/main amd64 libwebsockets19 amd64 4.3.2-3 [229 kB]
Get:12 http://ftp.us.debian.org/debian sid/main amd64 driftnet amd64 1.4.0-2+b1 [41.3 kB]
Get:13 http://ftp.us.debian.org/debian sid/main amd64 libblockdev-utils3 amd64 3.0.2-2 [17.6 kB]
Get:14 http://ftp.us.debian.org/debian sid/main amd64 libblockdev-crypto3 amd64 3.0.2-2 [22.8 kB]
Get:15 http://ftp.us.debian.org/debian sid/main amd64 libblockdev-fs3 amd64 3.0.2-2 [37.2 kB]
Get:16 http://ftp.us.debian.org/debian sid/main amd64 libblockdev-loop3 amd64 3.0.2-2 [9,740 B]
Get:17 http://ftp.us.debian.org/debian sid/main amd64 libblockdev-mdraid3 amd64 3.0.2-2 [16.7 kB]
Get:18 http://ftp.us.debian.org/debian sid/main amd64 libblockdev-nvme3 amd64 3.0.2-2 [20.4 kB]
Get:19 http://ftp.us.debian.org/debian sid/main amd64 libblockdev-part3 amd64 3.0.2-2 [19.3 kB]
Get:20 http://ftp.us.debian.org/debian sid/main amd64 libblockdev-swap3 amd64 3.0.2-2 [11.7 kB]
Get:21 http://ftp.us.debian.org/debian sid/main amd64 libblockdev3 amd64 3.0.2-2 [44.7 kB]
Get:22 http://ftp.us.debian.org/debian sid/main amd64 libfreexl1 amd64 2.0.0-1 [39.6 kB]
Get:23 http://ftp.us.debian.org/debian sid/main amd64 libwayland-server0 amd64 1.22.0-2 [32.5 kB]
Get:24 http://ftp.us.debian.org/debian sid/main amd64 python3-markdown all 3.4.4-1 [66.9 kB]
Get:25 http://ftp.us.debian.org/debian sid/main amd64 qemu-system-gui amd64 1:8.0.3+dfsg-4 [305 kB]
Get:26 http://ftp.us.debian.org/debian sid/main amd64 qemu-block-extra amd64 1:8.0.3+dfsg-4 [92.5 kB]
Get:27 http://ftp.us.debian.org/debian sid/main amd64 qemu-utils amd64 1:8.0.3+dfsg-4 [1,758 kB]
Get:28 http://ftp.us.debian.org/debian sid/main amd64 qemu-system-x86 amd64 1:8.0.3+dfsg-4 [9,520 kB]
Get:29 http://ftp.us.debian.org/debian sid/main amd64 qemu-system-common amd64 1:8.0.3+dfsg-4 [1,213 kB]
Get:30 http://ftp.us.debian.org/debian sid/main amd64 qemu-system-data all 1:8.0.3+dfsg-4 [1,542 kB]
Get:31 http://ftp.us.debian.org/debian sid/main amd64 qemu-user-binfmt amd64 1:8.0.3+dfsg-4 [3,740 B]
Get:32 http://ftp.us.debian.org/debian sid/main amd64 qemu-user amd64 1:8.0.3+dfsg-4 [13.6 MB]
Fetched 218 MB in 1min 31s (2,391 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 897532 files and directories currently installed.)
Removing linux-image-6.1.0-kali7-amd64 (6.1.20-2kali1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.1.0-kali7-amd64
/etc/kernel/postrm.d/zz-update-grub:
sudo: update: command not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-6.1.0-kali7-amd64 (--remove):
installed linux-image-6.1.0-kali7-amd64 package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-6.1.0-kali7-amd64
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

┌──(root㉿kali)-[~]
└─#
 
sudo cp ~/Documents/linux-firmware/amdgpu/* /lib/firmware/amdgpu && sudo update-initramfs -k all -u -v
cp: cannot stat '/root/Documents/linux-firmware/amdgpu/*': No such file or directory
 
ok i found it

──(root㉿kali)-[~]
└─# sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
linux-image-6.1.0-kali7-amd64
0 upgraded, 0 newly installed, 1 to remove and 172 not upgraded.
4 not fully installed or removed.
After this operation, 512 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 897532 files and directories currently installed.)
Removing linux-image-6.1.0-kali7-amd64 (6.1.20-2kali1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-6.1.0-kali7-amd64
/etc/kernel/postrm.d/zz-update-grub:
sudo: update: command not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-6.1.0-kali7-amd64 (--remove):
installed linux-image-6.1.0-kali7-amd64 package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-6.1.0-kali7-amd64
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

┌──(root㉿kali)-[~]
└─# dpkg --list | grep linux-image
rc linux-image-5.15.0-kali3-amd64 5.15.15-2kali1 amd64 Linux 5.15 for 64-bit PCs
rc linux-image-6.1.0-kali5-amd64 6.1.12-1kali2 amd64 Linux 6.1 for 64-bit PCs
rH linux-image-6.1.0-kali7-amd64 6.1.20-2kali1 amd64 Linux 6.1 for 64-bit PCs
iF linux-image-6.1.0-kali9-amd64 6.1.27-1kali2 amd64 Linux 6.1 for 64-bit PCs
iF linux-image-6.3.0-2-amd64 6.3.11-1 amd64 Linux 6.3 for 64-bit PCs (signed)
iU linux-image-amd64 6.3.11-1 amd64 Linux for 64-bit PCs (meta-packag
e)

┌──(root㉿kali)-[~]
└─#
 
There are a number of kernels, which offers the possibility of booting into any of them.

Just in case the point of posts #6 and #9 weren't clear, they were addressing the error, which has persisted in posts #13 and #15 in relation to the apt output:
dpkg: error processing package linux-image-6.1.0-kali7-amd64 (--remove):
which appears to be the main error statement, apart from the other problem output:
sudo: update: command not found

The reasoning was to see if avoiding the removal of that kernel would stop the error and allow upgrading to proceed with other packages.

In relation to the amdgpu firmware mentioned in post #14, it's usually in the package: firmware-amd-graphics, for debian based distros. I can't vouch for what name kali may have given it since I run nvidia.

The explanatory message:
Processing was halted because there were too many errors.
is ominous and suggests that the dpkg and apt tools have been overwhelmed, even to the point where they are unable to have the errors printed in the output.

It's worth checking the journal to see if there is any more information there.

An alternative to using apt is to use aptitude which has a few extra facilities in its functioning, in particular the command: aptitude safe-upgrade, and the command: aptitude why <pkg>, the latter offering an explanation as to why a package can or can't be installed. The aptitude command does have a learning curve to it. It may be worth considering. It can install and upgrade just as apt can.
 
Last edited:
/etc/kernel/postrm.d/zz-update-grub:
sudo: update: command not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
this is the part that i get stuck on since it looks like that script is just supposed to run update-grub after removing the kernel. this is the contents of that file from a kali purple 2023.2 virtual machine:
Code:
cat /etc/kernel/postrm.d/zz-update-grub
#! /bin/sh
set -e

command -v update-grub >/dev/null || exit 0

if type systemd-detect-virt >/dev/null 2>&1 &&
   systemd-detect-virt --quiet --container; then
        exit 0
fi

set -- $DEB_MAINT_PARAMS
mode="${1#\'}"
mode="${mode%\'}"
case $0:$mode in
    # Only run on postinst configure and postrm remove, to avoid wasting
    # time by calling update-grub multiple times on upgrade and removal.
    # Also run if we have no DEB_MAINT_PARAMS, in order to work with old
    # kernel packages.
    */postinst.d/*:|*/postinst.d/*:configure|*/postrm.d/*:|*/postrm.d/*:remove)
        if [ -e /boot/grub/grub.cfg ]; then
                exec update-grub
        fi
        ;;
esac

exit 0

@cregory you could try running the command

cat /etc/kernel/postrm.d/zz-update-grub

to see if the contents look like what was printed above. as has been mentioned, i'm not sure how that would result in:
sudo: update: command not found
 
rH linux-image-6.1.0-kali7-amd64 6.1.20-2kali1 amd64 Linux 6.1 for 64-bit PCs
regarding the "rH" at the beginning of that line, this is also from my kali purple vm:
Code:
dpkg --list | head           
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
as it seems clear the package has been marked r for removal, i am not sure if the H would indicate Half installed or Half uninstalled (removed) since that process is the one that seems to be holding things up. if there was an issue in the installation process that went unnoticed, i think it is possible that could cause issues at this point. you could try checking the status with

dpkg-query -s linux-image-6.1.0-kali7-amd64

to see if the Status: line may be able to help clarify if there are issues with it.
 
──(mastervenger㉿kali)-[~]
└─$ sudo su
[sudo] password for mastervenger:
┌──(root㉿kali)-[/home/mastervenger]
└─# cat /etc/kernel/postrm.d/zz-update-grub
#! /bin/sh
set -e

command -v update-grub >/dev/null || exit 0

if type systemd-detect-virt >/dev/null 2>&1 &&
systemd-detect-virt --quiet --container; then
exit 0
fi

set -- $DEB_MAINT_PARAMS
mode="${1#\'}"
mode="${mode%\'}"
case $0:$mode in
# Only run on postinst configure and postrm remove, to avoid wasting
# time by calling update-grub multiple times on upgrade and removal.
# Also run if we have no DEB_MAINT_PARAMS, in order to work with old
# kernel packages.
/postinst.d/:|/postinst.d/:configure|/postrm.d/:|/postrm.d/:remove)
if [ -e /boot/grub/grub.cfg ]; then
exec update-grub
fi
;;
esac

exit 0

┌──(root㉿kali)-[/home/mastervenger]
└─#

──(root㉿kali)-[/home/mastervenger]
└─# dpkg-query -s linux-image-6.1.0-kali7-amd64
Package: linux-image-6.1.0-kali7-amd64
Status: deinstall ok half-installed
Priority: optional
Section: kernel
Installed-Size: 500479
Maintainer: Kali Developers <[email protected]>
Architecture: amd64
Source: linux
Version: 6.1.20-2kali1
Config-Version: 6.1.20-2kali1
Depends: kmod, linux-base (>= 4.3~), initramfs-tools (>= 0.120+deb8u2) | linux-initramfs-tool
Recommends: firmware-linux-free, apparmor
Suggests: linux-doc-6.1, debian-kernel-handbook, grub-pc | grub-efi-amd64 | extlinux
Breaks: fwupdate (<< 12-7), initramfs-tools (<< 0.120+deb8u2), wireless-regdb (<< 2019.06.03-1~)
Description: Linux 6.1 for 64-bit PCs
The Linux kernel 6.1 and modules for use on PCs with AMD64, Intel 64 or
VIA Nano processors.
Homepage: https://www.kernel.org/
Original-Maintainer: Debian Kernel Team <[email protected]>

┌──(root㉿kali)-[/home/mastervenger]
└─#
here are the 2 from above. so what should i do next ?
 

Members online


Top