dpkg folder is missing - cannot apt-get update


Mar 9, 2021
hello, I am preparing to upgrade from 6.4 to 7. After starting with apt-get update && apt-get upgrade I got this output:

Screenshot 2022-07-08 at 17.35.26.png

After checking the content of /var/lib/ I see that the dpkg folder is missing.

Haven't been touching the node in a bit, nor backuped up. But the vms and lxc have always been running and working properly.

The repository /etc/apt/sources.list and /etc/apt/sources.list.d/ are untouched and correct: usual non-enterprise (or commented out) buster.

Can somebody tell me what's happening?
wanted to add that the updates section on the GUI hangs with a spinning ball and the message unable to initialize AptPkg::Cache (500)

Last login: Fri Jul  8 17:19:42 CEST 2022 on pts/1
Linux pve 5.4.189-2-pve #1 SMP PVE 5.4.189-2 (Mon, 13 Jun 2022 09:39:53 +0200) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@pve:~# pve6to7

Checking for package updates..
error reading cached package status in /var/lib/pve-manager/pkgupdates
flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory)
Could not open file  - open (2: No such file or directory)
Problem opening
The package lists or status file could not be parsed or opened.
WARN: unable to initialize AptPkg::Cache

FAIL: unable to retrieve list of package updates!

Checking proxmox-ve package version..
Could not open file  - open (2: No such file or directory)
Problem opening
The package lists or status file could not be parsed or opened.
FAIL: unable to retrieve package version information- unable to initialize AptPkg::Cache

FAIL: proxmox-ve package not found!


SKIP: standalone node.


SKIP: no hyper-converged ceph setup detected!


pbs: error fetching datastores - 500 Can't connect to (No route to host)
PASS: storage 'ISO2' enabled and active.
PASS: storage 'local' enabled and active.
PASS: storage 'local-lvm' enabled and active.
WARN: storage 'pbs' enabled but not active!


INFO: Checking common daemon services..
PASS: systemd unit 'pveproxy.service' is in state 'active'
PASS: systemd unit 'pvedaemon.service' is in state 'active'
PASS: systemd unit 'pvestatd.service' is in state 'active'
INFO: Checking for running guests..
PASS: no running guest detected.
INFO: Checking if the local node's hostname 'pve' is resolvable..
INFO: Checking if resolved IP is configured on local node..
PASS: Resolved node IP '' configured and active on single interface.
INFO: Checking backup retention settings..
PASS: no problems found.
INFO: checking CIFS credential location..
PASS: no CIFS credentials at outdated location found.
INFO: Checking custom roles for pool permissions..
INFO: Checking node and guest description/note legnth..
PASS: All node config descriptions fit in the new limit of 64 KiB
PASS: All guest config descriptions fit in the new limit of 8 KiB
INFO: Checking container configs for deprecated lxc.cgroup entries
PASS: No legacy 'lxc.cgroup' keys found.
INFO: Checking storage content type configuration..
PASS: no problems found
INFO: Checking if the suite for the Debian security repository is correct..
INFO: Make sure to change the suite of the Debian security repository from 'buster/updates' to 'bullseye-security' - in /etc/apt/sources.list:9
SKIP: NOTE: Expensive checks, like CT cgroupv2 compat, not performed without '--full' parameter


TOTAL:    22
PASSED:   14

ATTENTION: Please check the output for detailed information!
Try to solve the problems one at a time and then run this checklist tool again.

and the repository

deb http://ftp.de.debian.org/debian buster main contrib
deb http://ftp.de.debian.org/debian buster-updates main contrib

# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve buster pve-no-subscription

# security updates
deb http://security.debian.org buster/updates main contrib
Last edited:
Never run "apt-get upgrade". This might screw up your entire PVE installation. Only use apt dist-upgrade or apt full-upgrade as this will make sure all dependencies will match the correct version.
  • Like
Reactions: semanticbeeng
Sorry, my bad. Never did apt-get upgrade but apt-get dist-upgrade, just copied the above bit out of laziness. Eventually I reinstalled and recovered what I needed. Still don't get what happened there though
same issue as the OP
I ran
# apt update
# apt full-upgrade

Then it was working for day or two fine. The today I wanted to instal additional package and bad luck:

root@XXX[ ~ ]# apt update
Hit:1 http://ftp.cz.debian.org/debian bullseye InRelease
Hit:2 http://ftp.cz.debian.org/debian bullseye-updates InRelease                                 
Get:3 http://security.debian.org bullseye-security InRelease [48.4 kB]                           
Hit:4 http://download.proxmox.com/debian/pve bullseye InRelease               
Get:5 http://security.debian.org bullseye-security/main amd64 Packages [193 kB]
Get:6 http://security.debian.org bullseye-security/main Translation-en [122 kB]
Fetched 364 kB in 1s (678 kB/s)         
Reading package lists... Error!
E: Problem parsing dependency 21 of elastalert:all=0.2.4-1
E: Error occurred while processing elastalert (NewVersion2)
E: Problem with MergeList /var/lib/apt/lists/ftp.cz.debian.org_debian_dists_bullseye_main_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.
root@XXX[ ~ ]#

Any suggestions for fix?
fixed by removing the content of
I'm just concerned about the root cause of this mess...hope it doesn't happen again


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!