when i make sudo apt-get update && sudo apt-get upgrade this early morning for my new kernel 4.4.0-131-generic. i get my snapd error.

Setting up snapd (2.34.2~14.04) ...  
Failed to enable unit: Unit file snapd.autoimport.service does not exist.
dpkg: error processing package snapd (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of snapd-xdg-open:
snapd-xdg-open depends on snapd (= 2.34.2~14.04); however:
Package snapd is not configured yet.

dpkg: error processing package snapd-xdg-open (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

i don't know how i do, i tried sudo dpkg -a --configure && sudo apt purge snapd* && sudo apt-get remove snapd*

this not solved to me!! also i try to clear all cache on my Ubuntu and reinstall snapd, it's not fixed.

  • askubuntu.com/questions/877543/… (but adjust it to 18.04)
    – Rinzwind
    Aug 7, 2018 at 10:31
  • Thanks @Rinzwind his use xenial ubuntu sir, while i use trusty sir Aug 7, 2018 at 10:34
  • The version does not matter; you just got to adjust the commands to "trusty" if there is any numbering involved.
    – Rinzwind
    Aug 7, 2018 at 10:41
  • @Rinzwind yeah your right sir, when i checking, i found xenial package on my trusty, wait a minute sir Aug 7, 2018 at 10:45
  • 2
    @Rinzwind it's solved with clear xenial package sir, thanks Aug 7, 2018 at 11:18

1 Answer 1


To solved it,

First Step
Check all package source using:

rgrep 'xenial' /etc/apt

cause i used trusty instead xenial, so i remove all sources that of snapd* using

sudo add-apt-repository -r 'deb [some link xenial] xenial Release or inRelease'

Next Step

and i can purge and remove snapd to solved that.

dpkg --purge --force-all snapd
sudo apt install --fix-broken

run sudo apt-get update,after updated it's solved to me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.