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
  • 48,105
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
  • Can't sudo apt-get install steam and can't sudo apt-get install --reinstall steam – BeGood Nov 23 '15 at 02:17
  • what error does it say when you try to install it? – Clay Hill Nov 23 '15 at 02:37
  • Their is also the ugly way of doing it using locate. sudo updatedb && sudo locate steam – Clay Hill Nov 23 '15 at 02:41
  • Steam still working.... http://paste.ubuntu.com/13467649/ – BeGood Nov 23 '15 at 03:05
  • sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6 && sudo apt-get install steam -y The reason you want to install it is because if it will install correctly it will uninstall correctly. – Clay Hill Nov 23 '15 at 03:31
  • 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. – BeGood Nov 23 '15 at 03:32
  • if you cannot find lib32bz2-1.0 then run sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0:i386 lib32stdc++6 && sudo apt-get install steam -y – Clay Hill Nov 23 '15 at 03:37
  • If the command is too long please post it in here – BeGood Nov 23 '15 at 03:38
  • Well I'm not sure then. If you want to get rid of all the files dealing with steam you can find them with the locate command and delete them individually. You did also try sudo apt-get check right? I doubt it will find anything, but it may. – Clay Hill Nov 23 '15 at 03:39
  • If you want me provide more information please let me knoow – BeGood Nov 23 '15 at 03:41