2

As I mention in Q.

sudo apt-get remove steam
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'steam:i386' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt-get purge steam
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'steam:i386' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt-get remove --purge steam
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'steam:i386' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt-get remove steam-launcher
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package steam-launcher

If I run steam from terminal, it is working.

$which steam    
/usr/bin/steam    

enter image description here


I also tried this or this


Update 1.

As @Ravan said:

$ apt-cache policy steam
steam:i386:
  Installed: (none)
  Candidate: 1:1.0.0.45-1ubuntu1.1
  Version table:
     1:1.0.0.45-1ubuntu1.1 0
        500 http://mirrors.163.com/ubuntu/ trusty-proposed/multiverse i386 Packages
     1:1.0.0.45-1ubuntu1 0
        500 http://mirrors.163.com/ubuntu/ trusty/multiverse i386 Packages

Please, let me know If I have to provide more information.

BeGood
  • 539

2 Answers2

2

This is the related chat room, The OP will merge his questions which are related to same root cause, deleted /var/lib/dpkg by mistake.

You have already recovered for some files like status. But you are still missing package info files in /var/lib/dpkg/info.

Most important is the installed file *.list. Without them dpkg will remove the package from the status file (for purge) and flag them as deinstall (for remove), but it will not remove the files.

Options:

  • It is recommended to reinstall the system as in this similar case: I just lost /var/lib/dpkg

  • Or If you have good Internet connection, flag all installed packages to be reinstalled. (like an upgrade operation).

    For easy way, use synaptic

  • Dirty way: Generate the *.list files and live with it. I couldn't manage to filter configuration files for each package. So remember any future apt-get remove will be like apt-get purge.

    1. Install apt-file

      sudo apt-get install apt-file
      
    2. Update package contents lists

      apt-file update
      
    3. Generate list for each installed package, quiet long operation (I didn't have time to optimize)

      mkdir file_lists_deleteme
      dpkg --get-selections | grep -v deinstall | awk '{print $1}' | xargs -I '{}' bash -c "apt-file -F list '{}' > file_lists_deleteme/'{}'.preformat"
      
      cd file_lists_deleteme
      for f in *.preformat; do awk '{for (i=2; i<=NF; i++) print $i}' $f > $(basename $f .preformat).list ; done
      
    4. Change ownership to root and install them to the system

      sudo chown root:root file_lists_deleteme/*.list
      sudo cp file_lists_deleteme/*.list /var/lib/dpkg/info/
      

For Steam & Flareget as they are not on the installed package list, the better is the reinstall them then purge/remove again.

Yes, you will see some dpkg complains (if you have chosen the dirty fix) like:

dpkg: warning: while removing flareget, directory '/usr/share/lintian/overrides' not empty so not removed

when it tries to remove some non-empty system folder. They are just warning & harmless, never mind about them.

user.dz
  • 49,176
0

You could try to install it and then purge it

sudo apt-get autoremove && sudo apt-get clean
sudo apt-get install steam
sudo apt-get purge steam
sudo dpkg -P steam

If install fails you can try forcing it or using sudo apt-get install --reinstall steam

Clay Hill
  • 104