dpkg: too many errors, stopping

creating a new user could be one way to see if the issue is system wide. if upgrade-grub works there, it could give you an idea what default settings look like.
 


Open a terminal and follow these instructions to fix your (sudo: update: command not found)

Code:
sudo -i
touch /etc/apt/sources.list
chmod 644 /etc/apt/sources.list
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list
apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6
apt update
Now try it again
 
Last edited by a moderator:
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)-[~]
└─#
If you're getting a post removal script it's because there's something going on not allowing you to continue. I know I'm late coming into this but you didn't remove your linux-image prior to installing the new one and updating grub did you. Because it looks to me like for whatever reason 6.1.0 is being deleting and then it's trying to process it as part of the update. I would start by getting 6.1.0 properly configured and in the right file path, do an update and upgrade without any errors and then do your kernel upgrade. It's being deleted and reinstalled but also generating post removal scripts. You gotta get your kernel stable before anything else.
 
Im sorry i have not been here last few days Could you please show me step by step how to do this because you are right no matter what i do i just keep going in circles
 
So if you can when you have the time if you would please provide me with a step by step fix
 
First thing I would do is comment out any repository that are not your original deb and deb src (sudo nano /etc/apt/sources.list) and then do sudo apt update, regardless of the results do sudo apt dist-upgrade. In most cases that will upgrade you to an already compiled kali kernel which now is 6.3 along with new software and tools. If that doesn't work you have two choices. First going to https://www.kernel.org and downloading the latest stable kernel version (it's generic so you'll have to configure it). Easiest thing to do is to unpack it using tar -xf (and your download) cd into the extracted file, then follow the readme instructions. You should be able to use the command "make menuconfig" and a gui will come up that makes it pretty straight forward. Once in you want to look at the bottom and select "load". That will load your current kernel config so all you have to do is make any necessary changes. The other way which is very easy to do but it is from ppa/mainline which is a generic kernel but it will work until you can get the kali dist upgrade to the latest version. Just nav here > https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.3/ find the version you need and download all 4 files. You can nav to any other version by changing the 6.3 at the end of the URL. Once you have everything downloaded type this "sudo apt install ./linux-*.deb" into the command line and watch the magic happen. Then do "update-grub" which you have to be in root, sudo won't do. Then type reboot and you should be good to go. It won't fix broken packages or installs so the best thing to do is completely remove them before you update the kernel then afterwards run update and upgrade and hopefully that fixes things. Good luck.
 
Sorry it took so long to reply, I travel alot and don't have alot of time to keep up with things. I hope you were able to get it resolved, if not the instructions about should get things squared away. I'll give a handy piece of advice, never store any files or info on your kali box that you coouldn't lose. Reason being, sometimes just downloading the latest iso and and booting up a fresh install is the fastest and easiest way to solve some issues. I do it a couple times a year just to be sure everything keeps running smooth. I also keep a live version to plug and a fresh iso on a thumbdrive just in case. I can't afford to go down in the middle of something, especially with other operators in a network.
 

Members online


Top