You may have a broken apt configure that calls for snap (which is not installed if you get the error below):
apt install coreutils
Reading state information... Done
E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Connection reset by peer
E: Could not read message separator line after handshake from [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Connection reset by peer
E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Connection reset by peer
E: Could not read message separator line after handshake from [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Connection reset by peer
Remove the 20snapd.conf profile:
mv /etc/apt/apt.conf.d/20snapd.conf ~
usr, bin, apt, dev, null, reset, peeryou, configure, installed, install, coreutils, peer, separator, handshake, snapd, conf, mv, etc,