Fixed with "fuser -vik /var/cache/debconf/config.dat" but apparently some seconds later it was already unlocked. # apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: ca-certificates-mono cli-common dbconfig-common dbconfig-mysql default-mysql-client default-mysql-server libapache2-mod-php libapache2-mod-php7.2 libdbi1 libexpat1-dev libgdiplus libglib2.0-cil libgsl23 libgslcblas0 libgtk2.0-cil libjs-c3 libjs-chartjs libjs-d3 libjs-jquery-colorpicker libjs-jquery-cookie libjs-jquery-hotkeys libjs-jquery-jstree libjs-jquery-metadata libjs-jquery-tablesorter libjs-jquery-timepicker libjs-jquery-ui libjs-jquery-ui-theme-smoothness libjs-jquery-ui-theme-south-street libjs-jquery-ui-theme-ui-darkness libjs-jquery-ui-touch-punch libmono-addins-gui0.2-cil libmono-addins0.2-cil libmono-cairo4.0-cil libmono-corlib4.5-cil libmono-i18n-west4.0-cil libmono-i18n4.0-cil libmono-posix4.0-cil libmono-security4.0-cil libmono-sharpzip4.84-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil libmono-system-drawing4.0-cil libmono-system-security4.0-cil libmono-system-xml4.0-cil libmono-system4.0-cil libopencolorio1v5 libphp-phpmailer libpython3-dev libpython3.6-dev librrd8 libtinyxml2.6.2v5 libyaml-cpp0.5v5 linux-headers-4.15.0-13 linux-headers-4.15.0-13-generic linux-headers-4.15.0-15 linux-headers-4.15.0-15-generic linux-image-4.15.0-13-generic linux-image-4.15.0-15-generic linux-image-extra-4.15.0-13-generic linux-image-extra-4.15.0-15-generic linux-signed-image-4.15.0-15-generic mono-4.0-gac mono-gac mono-runtime mono-runtime-common mono-runtime-sgen php-common php-gd php-gmp php-ldap php-mbstring php-mysql php-pear php-php-gettext php-phpseclib php-snmp php-twig php-xml php7.2-cli php7.2-common php7.2-gd php7.2-gmp php7.2-json php7.2-ldap php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-readline php7.2-snmp php7.2-xml rrdtool shim snmp Use 'apt autoremove' to remove them. The following additional packages will be installed: mysql-server-5.7 Suggested packages: mailx tinyca The following packages will be upgraded: mysql-server-5.7 1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. 2 not fully installed or removed. Need to get 0 B/3.190 kB of archives. After this operation, 48,1 kB disk space will be freed. Do you want to continue? [Y/n] Y Preconfiguring packages ... (Reading database ... 354086 files and directories currently installed.) Preparing to unpack .../mysql-server-5.7_5.7.22-0ubuntu18.04.1_amd64.deb ... Unpacking mysql-server-5.7 (5.7.22-0ubuntu18.04.1) over (5.7.21-1ubuntu1) ... Processing triggers for ureadahead (0.100.0-20) ... Setting up mysql-server-core-5.7 (5.7.22-0ubuntu18.04.1) ... Processing triggers for systemd (237-3ubuntu10) ... Processing triggers for man-db (2.8.3-2) ... Setting up mysql-server-5.7 (5.7.22-0ubuntu18.04.1) ... Checking if update is needed. Checking server version. Running queries to upgrade MySQL server. Checking system database. mysql.columns_priv OK mysql.db OK mysql.engine_cost OK mysql.event OK mysql.func OK mysql.general_log OK mysql.gtid_executed OK mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.innodb_index_stats OK mysql.innodb_table_stats OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.proxies_priv OK mysql.server_cost OK mysql.servers OK mysql.slave_master_info OK mysql.slave_relay_log_info OK mysql.slave_worker_info OK mysql.slow_log OK mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK The sys schema is already up to date (version 1.5.1). Checking databases. sys.sys_config OK Upgrade process completed successfully. Checking if update is needed.