1

i installed a kernel:apt install linux-image-4.18.0-0.bpo.1-amd64, after I used apt autoremove.
It has removed some python packages that i don' t remember, after I ran into some problems.
Settings and gnome-tweak-tool disappeared, setting is still missing.
I tried apt -f install, apt --fix-broken install and dpkg --configure -a but dpkg error 1.
Therefore i manually deleted the problematic fields in /var/lib/dpkg/status, initially 3.
After I was able to use apt again but no to install ansible, gnome-tweak-tool or any problematic package.
Then I used apt upgrade, and now is again broken (same packages):

[..]
    dpkg: error processing package python-jinja2 (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of python-gtk2:
     python-gtk2 depends on python-numpy (>= 1:1.10.0~b1); however:
      Package python-numpy is not configured yet.
     python-gtk2 depends on python-numpy-abi9; however:
      Package python-numpy-abi9 is not installed.
      Package python-numpy which provides python-numpy-abi9 is not configured yet.
     python-gtk2 depends on python-cairo (>= 1.0.2-1.1); however:
      Package python-cairo is not configured yet.
     python-gtk2 depends on python-gobject-2 (>= 2.21.3); however:
      Package python-gobject-2 is not configured yet.

    dpkg: error processing package python-gtk2 (--configure):
     dependency problems - leaving unconfigured
    dpkg: dependency problems prevent configuration of gimp:
     gimp depends on python-gtk2 (>= 2.8.0); however:
      Package python-gtk2 is not configured yet.

    dpkg: error processing package gimp (--configure):
     dependency problems - leaving unconfigured
    Processing triggers for libc-bin (2.24-11+deb9u3) ...
    Errors were encountered while processing:
     python-idna
     python-yaml
     python-crypto
     python-pyasn1
     python-netaddr
     python-xmltodict
     python-pkg-resources
     python-markupsafe
     python-numpy
     python-httplib2
     python-gobject-2
     python-six
     python-paramiko
     python-selinux
     ansible
     python-enum34
     python-cryptography
     python-cairo
     python-ipaddress
     python-setuptools
     python-jinja2
     python-gtk2
     gimp
    E: Sub-process /usr/bin/dpkg returned an error code (1)

I' m on debian 9. How can I fix it?
Additional output:

grep remove  /var/log/dpkg.log 
2018-11-04 18:30:54 startup packages remove
2018-11-04 18:30:55 remove libjack-jackd2-0:amd64 1.9.10+20150825git1ed50c92~dfsg-5 <none>
2018-11-04 19:23:33 startup packages remove
2018-11-04 19:23:33 remove vlc:amd64 3.0.3-1-0+deb9u1 <none>
2018-11-05 22:58:55 startup packages remove
2018-11-05 22:59:00 remove linux-image-4.18.15-scorpion:amd64 1 <none>
2018-11-05 22:59:41 startup packages remove
2018-11-05 22:59:41 remove gnupg-agent:all 2.2.10-3~bpo9+1 <none>
2018-11-07 10:20:33 startup packages remove
2018-11-07 10:20:38 remove linux-image-4.18.6-scorpion:amd64 1 <none>
2018-11-09 15:00:33 startup packages remove
2018-11-09 15:00:33 remove ansible:all 2.2.1.0-2 <none>
2018-11-11 11:34:50 startup packages remove
2018-11-11 11:34:55 remove linux-image-4.18.6:amd64 4.18.6-1 <none>
2018-11-11 11:47:55 startup packages remove
2018-11-11 11:47:55 remove python-netaddr:all 0.7.18-2 <none>
2018-11-11 11:47:55 remove linux-image-4.9.0-7-amd64:amd64 4.9.110-3+deb9u2 <none>
2018-11-11 11:48:26 remove python-kerberos:amd64 1.1.5-2+b2 <none>
2018-11-11 11:48:26 remove python-selinux:amd64 2.6-3+b3 <none>
2018-11-11 11:48:26 remove python-xmltodict:all 0.10.2-1 <none>
2018-11-11 11:48:27 remove ieee-data:all 20160613.1 <none>
2018-11-11 12:00:53 startup packages remove
2018-11-11 12:00:58 remove linux-image-4.18.0-0.bpo.1-amd64:amd64 4.18.6-1~bpo9+1 <none>
2018-11-11 12:01:54 startup packages remove
2018-11-11 12:01:54 remove ansible:all 2.7.1-1ppa~trusty <none>
2018-11-11 12:02:10 startup packages remove
2018-11-11 12:02:10 remove apparmor:amd64 2.11.0-3+deb9u2 <none>
2018-11-11 12:02:11 remove libapparmor-perl:amd64 2.11.0-3+deb9u2 <none>
2018-11-11 12:12:32 startup packages remove
2018-11-11 12:12:37 remove ansible:all 2.7.1-1ppa~trusty <none>
2018-11-11 12:12:59 startup packages remove
2018-11-11 12:12:59 remove python-netaddr:all 0.7.18-2 <none>
2018-11-11 12:35:46 startup packages remove
2018-11-11 12:35:46 remove ieee-data:all 20160613.1 <none>
2018-11-11 12:35:46 remove python-httplib2:all 0.9.2+dfsg-1 <none>
2018-11-11 12:35:46 remove python-jinja2:all 2.8-1 <none>
2018-11-11 12:35:47 remove python-paramiko:all 2.0.0-1 <none>
2018-11-11 12:35:47 remove python-yaml:amd64 3.12-1 <none>
2018-11-11 12:35:47 remove sshpass:amd64 1.06-1 <none>
2018-11-11 12:35:48 remove python-markupsafe:amd64 0.23-3 <none>
2018-11-11 12:36:01 startup packages remove
2018-11-11 12:36:01 remove python-httplib2:all 0.9.2+dfsg-1 <none>
2018-11-11 12:36:01 remove python-jinja2:all 2.8-1 <none>
2018-11-11 12:36:01 remove python-paramiko:all 2.0.0-1 <none>
2018-11-11 12:36:02 remove python-yaml:amd64 3.12-1 <none>
2018-11-11 12:36:02 remove gnome:amd64 1:3.22+3 <none>
2018-11-11 12:36:02 remove task-gnome-desktop:all 3.39 <none>
2018-11-11 12:36:03 remove gnome-core:amd64 1:3.22+3 <none>
2018-11-11 12:36:04 remove chrome-gnome-shell:all 8-4 <none>
2018-11-11 12:36:05 remove dblatex:all 0.3.9-3 <none>
2018-11-11 12:36:05 remove gcj-6-jre-lib:all 6.3.0-18+deb9u1 <none>
2018-11-11 12:36:05 remove gimp:amd64 2.8.18-1+deb9u1 <none>
2018-11-11 12:36:06 remove gnome-control-center:amd64 1:3.22.2-3 <none>
2018-11-11 12:36:06 remove gnome-tweak-tool:all 3.22.0-1 <none>
2018-11-11 12:36:07 remove gvfs-backends:amd64 1.30.4-1 <none>
2018-11-11 12:36:07 remove inkscape:amd64 0.92.1-1 <none>
2018-11-11 12:36:08 remove libsac-java-gcj:amd64 1.3+dfsg-2 <none>
2018-11-11 12:36:09 remove libgcj-bc:amd64 6.3.0-4 <none>
2018-11-11 12:36:09 remove libgcj17:amd64 6.3.0-18+deb9u1 <none>
2018-11-11 12:36:10 remove libgcj-common:all 1:6.3-4 <none>
2018-11-11 12:36:10 remove libglade2-dev:amd64 1:2.6.4-2 <none>
2018-11-11 12:36:11 remove libsmbclient-dev:amd64 2:4.5.12+dfsg-2+deb9u3 <none>
2018-11-11 12:36:12 remove vlc-plugin-samba:amd64 3.0.3-1-0+deb9u1 <none>
2018-11-11 12:36:12 remove ndiff:all 7.40-1 <none>
2018-11-11 12:36:12 remove playonlinux:all 4.2.10-2 <none>
2018-11-11 12:36:13 remove printer-driver-sag-gdi:all 0.1-4 <none>
2018-11-11 12:36:13 remove prosper:all 1.00.4+cvs.2007.05.01-4.1 <none>
2018-11-11 12:36:14 remove samba:amd64 2:4.5.12+dfsg-2+deb9u3 <none>
2018-11-11 12:36:16 remove samba-common-bin:amd64 2:4.5.12+dfsg-2+deb9u3 <none>
2018-11-11 12:36:17 remove python-samba:amd64 2:4.5.12+dfsg-2+deb9u3 <none>
2018-11-11 12:36:17 remove samba-vfs-modules:amd64 2:4.5.12+dfsg-2+deb9u3 <none>
2018-11-11 12:36:17 remove python-requests:all 2.12.4-1 <none>
2018-11-11 12:36:18 remove python-keyring:all 10.1-1 <none>
2018-11-11 12:36:18 remove python-all-dev:amd64 2.7.13-2 <none>
2018-11-11 12:36:19 remove python-all:amd64 2.7.13-2 <none>
2018-11-11 12:36:19 remove python-bs4:all 4.5.3-1 <none>
2018-11-11 12:36:20 remove python-cffi:all 1.9.1-2 <none>
2018-11-11 12:36:20 remove python-keyrings.alt:all 1.3-1 <none>
2018-11-11 12:36:20 remove python-dev:amd64 2.7.13-2 <none>
2018-11-11 12:36:21 remove python-dnspython:all 1.15.0-1 <none>
2018-11-11 12:36:21 remove python-html5lib:all 0.999999999-1 <none>
2018-11-11 12:36:22 remove python-openssl:all 16.2.0-1 <none>
2018-11-11 12:36:22 remove python-pip:all 9.0.1-2 <none>
2018-11-11 12:36:22 remove python-scour:all 0.32-2 <none>
2018-11-11 12:36:23 remove python-wheel:all 0.29.0-2 <none>
2018-11-11 12:36:23 remove python-xdg:all 0.25-4 <none>
2018-11-11 12:36:23 remove python3-smbc:amd64 1.0.15.6-1 <none>
2018-11-11 12:36:24 remove qbittorrent:amd64 3.3.7-3 <none>
2018-11-11 12:36:25 remove samba-dsdb-modules:amd64 2:4.5.12+dfsg-2+deb9u3 <none>
2018-11-11 12:36:26 remove texlive-pstricks:all 2016.20170123-5 <none>
2018-11-11 12:36:27 remove libsmbclient:amd64 2:4.5.12+dfsg-2+deb9u3 <none>
2018-11-11 12:36:43 remove python-secretstorage:all 2.3.1-2 <none>
2018-11-11 12:36:43 remove python-cryptography:amd64 1.7.1-3 <none>
2018-11-11 12:36:43 remove python-urllib3:all 1.19.1-1 <none>
2018-11-11 12:36:44 remove python:amd64 2.7.13-2 <none>
2018-11-11 12:36:44 remove python-apt:amd64 1.4.0~beta3 <none>
2018-11-11 12:36:45 remove python-gtk2:amd64 2.24.0-5.1 <none>
2018-11-11 12:36:45 remove python-cairo:amd64 1.8.8-2.2 <none>
2018-11-11 12:36:45 remove python-cffi-backend:amd64 1.9.1-2 <none>
2018-11-11 12:36:46 remove python-chardet:all 2.3.0-2 <none>
2018-11-11 12:36:46 remove python-crypto:amd64 2.6.1-7 <none>
2018-11-11 12:36:46 remove python-dbus:amd64 1.2.4-1+b1 <none>
2018-11-11 12:36:46 remove python-enum34:all 1.1.6-1 <none>
2018-11-11 12:36:46 remove python-gi:amd64 3.22.0-2 <none>
2018-11-11 12:36:47 remove python-gobject-2:amd64 2.28.6-13 <none>
2018-11-11 12:36:47 remove python-idna:all 2.2-1 <none>
2018-11-11 12:36:47 remove python-ipaddress:all 1.0.17-1 <none>
2018-11-11 12:36:47 remove python-ldb:amd64 2:1.1.27-1+b1 <none>
2018-11-11 12:36:48 remove python-lxml:amd64 3.7.1-1 <none>
2018-11-11 12:36:48 remove python-numpy:amd64 1:1.12.1-3 <none>
2018-11-11 12:36:48 remove python-setuptools:all 33.1.1-1 <none>
2018-11-11 12:36:48 remove python-pkg-resources:all 33.1.1-1 <none>
2018-11-11 12:36:48 remove python-pycparser:all 2.17-2 <none>
2018-11-11 12:36:48 remove python-ply:all 3.9-1 <none>
2018-11-11 12:36:49 remove python-pyasn1:all 0.1.9-2 <none>
2018-11-11 12:36:49 remove python-six:all 1.10.0-3 <none>
2018-11-11 12:36:49 remove python-tdb:amd64 1.3.11-2 <none>
2018-11-11 12:36:49 remove python-webencodings:all 0.5-2 <none>
2018-11-11 12:36:49 remove python-wxgtk3.0:amd64 3.0.2.0+dfsg-4 <none>
2018-11-11 12:36:50 remove python-wxversion:all 3.0.2.0+dfsg-4 <none>
2018-11-11 12:36:50 remove texlive-extra-utils:all 2016.20170123-5 <none>
2018-11-11 12:36:51 remove texlive-latex-extra:all 2016.20170123-5 <none>
2018-11-11 12:36:52 remove texlive-pictures:all 2016.20170123-5 <none>
2018-11-11 12:36:52 remove texlive-science:all 2016.20170123-5 <none>
2018-11-11 12:36:53 remove python-markupsafe:amd64 0.23-3 <none>
2018-11-11 20:57:33 startup packages remove
2018-11-11 20:57:33 remove okteta:amd64 4:16.08.3-1 <none>

closed as too broad by Rui F Ribeiro, RalfFriedl, Archemar, schily, GAD3R Nov 15 '18 at 19:41

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Disable or remove the Trusty PPA , ansible is available in Debian. – GAD3R Nov 12 '18 at 15:30
  • @GAD3R I already did it. Ansible is available but not the latest version, debian installs the 2.2.1.0-2. Some project requires ansible >2.5, but I don' t need them. So one of the first thing that i done was disable the ppa. But ansible is one of the problematic package that I can' manage. – Scorpion Nov 12 '18 at 17:03
  • I'm going to reinstall the system. I can' t use apt (or dpkg) at all. – Scorpion Nov 14 '18 at 18:03
  • Backup status and status-old under /var/lib/dpkg/ then mv /var/lib/dpkg/status-old /var/lib/dpkg/status run dpkg --configure -a then check apt. – GAD3R Nov 14 '18 at 18:12
  • 1
    I reinstalled the system. – Scorpion Nov 15 '18 at 19:41

Browse other questions tagged or ask your own question.