• if error code (1) on apt-get upgrade ref_1

    sudo dpkg --configure -a
    
  • list installed packages

    dpkg --get-selections
    

ref