emil@emil:~$ sudo apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libsemanage1 : Depends: libsemanage-common (= 3.1-1) but 3.4-1 is installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). emil@emil:~$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree... Done Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: dh-elpa-helper dvisvgm elpa-dash elpa-git-commit elpa-magit elpa-magit-section elpa-with-editor emacs fonts-lmodern libbit-vector-perl libcarp-clan-perl libcommons-logging-java libcrypt-rc4-perl libdate-calc-perl libdate-calc-xs-perl libdevel-globaldestruction-perl libdigest-perl-md5-perl libdist-checkconflicts-perl libemail-date-format-perl libfile-homedir-perl libfile-which-perl libfontbox-java libgs9-common libipc-shareable-perl libjcode-pm-perl libkpathsea6 liblog-dispatch-perl liblog-log4perl-perl libmail-sendmail-perl libmime-lite-perl libmime-types-perl libole-storage-lite-perl libparse-recdescent-perl libpdfbox-java libpotrace0 libptexenc1 libspreadsheet-parseexcel-perl libspreadsheet-writeexcel-perl libstring-crc32-perl libsynctex2 libsys-hostname-long-perl libteckit0 libtexlua53-5 libtexluajit2 libtiff5 libunicode-map-perl libwebp6 libwoff1 libyaml-tiny-perl libzzip-0-13 lmodern preview-latex-style ps2eps t1utils tex-gyre Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: libsemanage1 0 upgraded, 0 newly installed, 1 to remove and 10 not upgraded. 20 not fully installed or removed. After this operation, 314 kB disk space will be freed. Do you want to continue? [Y/n] y Setting up passwd (1:4.13+dfsg1-1+b1) ... grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8 groupadd: group 'shadow' already exists Group ID 42 has been allocated for the shadow group. You have either used 42 yourself or created a shadow group with a different ID. Please correct this problem and reconfigure with dpkg --configure passwd''. Note that both user and group IDs in the range 0-99 are globally allocated by the Debian project and must be the same on every Debian system. dpkg: error processing package passwd (--configure): installed passwd package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: passwd E: Sub-process /usr/bin/dpkg returned an error code (1) emil@emil:~$