卸载 Google Chrome 后删除剩余的软件包

卸载 Google Chrome 后删除剩余的软件包

在此向这个精彩的论坛发布我的第一个问题!

我有一个旧的 chrome 安装,由于 32 位 xubuntu 系统,不再受支持。根据更新的输出(见下文),删除命令没有删除所有内容,所以我尝试了清除,但这并没有改变结果。

我该怎么办?
垃圾邮件限制使我无法提供完整的文档,因此我希望获得逐步的帮助[经过一些编辑后,现在有了预期的文档]。

peter@peter-HP-Compaq-2510p:~$ sudo apt-get update 
Ign:1 http ://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http ://se.archive.ubuntu.com/ubuntu bionic InRelease                     
Hit:3 http ://se.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Hit:4 http ://se.archive.ubuntu.com/ubuntu bionic-backports InRelease           
Get:5 http ://dl.google.com/linux/chrome/deb stable Release [943 B]             
Get:6 http ://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]         
Get:7 http ://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Ign:8 http ://archive.canonical.com/ubuntu saucy InRelease                      
Err:9 http ://archive.canonical.com/ubuntu saucy Release                        
  404  Not Found [IP: 91.189.91.15 80]
Ign:6 http ://dl.google.com/linux/chrome/deb stable Release.gpg
Reading package lists... Done
E: The repository 'http ://archive.canonical.com/ubuntu saucy Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http ://dl.google.com/linux/chrome/deb stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E
E: The repository 'http ://dl.google.com/linux/chrome/deb stable Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


peter@peter-HP-Compaq-2510p:~$ sudo apt-get remove google-chrome-stable
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'google-chrome-stable' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


peter@peter-HP-Compaq-2510p:~$ sudo apt-get purge google-chrome-stable
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  google-chrome-stable*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 238783 files and directories currently installed.)
Purging configuration files for google-chrome-stable (48.0.2564.116-1) ...

peter@peter-HP-Compaq-2510p:~$ sudo apt-get update
Hit:1 http ://se.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http ://se.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                  
Ign:3 http ://dl.google.com/linux/chrome/deb stable InRelease                                                        
Hit:4 http ://archive.canonical.com/ubuntu saucy InRelease                                     
Get:5 http ://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]                   
Hit:6 http ://se.archive.ubuntu.com/ubuntu bionic-backports InRelease                                       
Get:7 http ://dl.google.com/linux/chrome/deb stable Release [943 B]                                         
Get:8 http ://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]              
Ign:8 http://dl.google.com/linux/chrome/deb stable Release.gpg
Reading package lists... Done
W: GPG error: http ://dl.google.com/linux/chrome/deb stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E
E: The repository 'http ://dl.google.com/linux/chrome/deb stable Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
peter@peter-HP-Compaq-2510p:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


peter@peter-HP-Compaq-2510p:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"

谢谢你!

编辑:
尝试了答案中提到的命令。请注意,由于某种原因,按顺序进行的两次更新给出了略有不同的输出。

peter@peter-HP-Compaq-2510p:~$ sudo apt-get autoclean
[sudo] password for peter: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done

peter@peter-HP-Compaq-2510p:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

peter@peter-HP-Compaq-2510p:~$ sudo apt-get update
Hit:1 http ://se.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http ://se.archive.ubuntu.com/ubuntu bionic-updates InRelease                               
Hit:3 http ://se.archive.ubuntu.com/ubuntu bionic-backports InRelease                             
Hit:4 http ://archive.canonical.com/ubuntu saucy InRelease                                        
Ign:5 http ://dl.google.com/linux/chrome/deb stable InRelease                                     
Get:6 http ://dl.google.com/linux/chrome/deb stable Release [943 B]                               
Get:7 http ://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]     
Get:8 http ://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]        
Ign:7 http ://dl.google.com/linux/chrome/deb stable Release.gpg 
Reading package lists... Done
W: GPG error: http ://dl.google.com/linux/chrome/deb stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E
E: The repository 'http ://dl.google.com/linux/chrome/deb stable Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details. 

peter@peter-HP-Compaq-2510p:~$ sudo apt-get update
Hit:1 http ://se.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http ://se.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                              
Ign:3 http ://dl.google.com/linux/chrome/deb stable InRelease                                                                    
Hit:4 http ://se.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                                            
Get:5 http ://dl.google.com/linux/chrome/deb stable Release [943 B]                                                                                                              
Get:6 http ://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]                                                                                    
Get:7 http ://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Ign:8 http ://archive.canonical.com/ubuntu saucy InRelease                            
Err:9 http ://archive.canonical.com/ubuntu saucy Release                              
  404  Not Found [IP: 91.189.91.15 80]
Ign :6 http ://dl.google.com/linux/chrome/deb stable Release.gpg
Reading package lists... Done
E: The repository 'http ://archive.canonical.com/ubuntu saucy Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http ://dl.google.com/linux/chrome/deb stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6494C6D6997C215E
E: The repository 'http ://dl.google.com/linux/chrome/deb stable Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

编辑:
使用结果sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <PUBKEY>

peter@peter-HP-Compaq-2510p:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6494C6D6997C215E
Executing: /tmp/apt-key-gpghome.peImdN0Ry6/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 6494C6D6997C215E
gpg: key 7721F63BD38B4796: 17 signatures not checked due to missing keys
gpg: key 7721F63BD38B4796: public key "Google Inc. (Linux Packages Signing Authority) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1

peter@peter-HP-Compaq-2510p:~$ sudo apt-get update
Hit:1 http ://se.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http ://se.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Get:3 http ://se.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB] 
Ign:4 http ://dl.google.com/linux/chrome/deb stable InRelease                   
Get:5 http ://dl.google.com/linux/chrome/deb stable Release [943 B]             
Get:6 http ://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]         
Hit:7 http ://security.ubuntu.com/ubuntu bionic-security InRelease       
Ign:8 http ://archive.canonical.com/ubuntu saucy InRelease               
Err:9 http ://archive.canonical.com/ubuntu saucy Release
  404  Not Found [IP: 91.189.91.15 80]
Reading package lists... Done
E: The repository 'http ://archive.canonical.com/ubuntu saucy Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http ://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'i386'

peter@peter-HP-Compaq-2510p:~$ sudo apt-get purge google-chrome-stable:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'google-chrome-stable' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

peter@peter-HP-Compaq-2510p:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
peter@peter-HP-Compaq-2510p:~$

编辑:
结果是,通过使用 GUI“软件和更新”,删除了一个带有 crome 的软件和一个带有 saucy 的软件。

peter@peter-HP-Compaq-2510p:~$ sudo apt-get update
Hit:1 http ://se.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http ://se.archive.ubuntu.com/ubuntu bionic-updates InRelease
Get:3 http ://se.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Get:4 http ://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:5 http ://archive.canonical.com/ubuntu saucy InRelease
Fetched 163 kB in 2s (71,9 kB/s)                                                                
Reading package lists... Done
peter@peter-HP-Compaq-2510p:~$ 

编辑:根据 karel 的建议,我在 source.list 中注释掉了以下行:#deb-src http://archive.canonical.com/ubuntu saucy partner。现在只剩下四个项目需要解决。

peter@peter-HP-Compaq-2510p:~$ sudo nano /etc/apt/sources.list
peter@peter-HP-Compaq-2510p:~$ sudo apt-get update
Hit:1 http ://se.archive.ubuntu.com/ubuntu bionic InRelease                                 
Hit:2 http ://se.archive.ubuntu.com/ubuntu bionic-updates InRelease                         
Get:3 http ://se.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Get:4 http ://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Fetched 163 kB in 4s (43,1 kB/s)                              
Reading package lists... Done
peter@peter-HP-Compaq-2510p:~$ 

编辑:尝试根据 karel 的建议,通过改变 sources.list 来解决问题。

peter@peter-HP-Compaq-2510p:~$ cat /etc/apt/sources.list
#Five lines inserted 04/25/2019 #P = commented out same day
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse  
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse  
deb http://archive.canonical.com/ubuntu bionic partner

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
#P deb http://se.archive.ubuntu.com/ubuntu/ bionic main restricted
#P deb-src http://se.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
#P deb http://se.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
#P deb-src http://se.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
#P deb http://se.archive.ubuntu.com/ubuntu/ bionic universe
#P deb-src http://se.archive.ubuntu.com/ubuntu/ bionic universe
#P deb http://se.archive.ubuntu.com/ubuntu/ bionic-updates universe
#P deb-src http://se.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
#P deb http://se.archive.ubuntu.com/ubuntu/ bionic multiverse
#P deb-src http://se.archive.ubuntu.com/ubuntu/ bionic multiverse
#P deb http://se.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
#P deb-src http://se.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
#P deb http://se.archive.ubuntu.com/ubuntu/ bionic-backports main universe multiverse restricted
#P deb-src http://se.archive.ubuntu.com/ubuntu/ bionic-backports main universe multiverse restricted

#P deb http://security.ubuntu.com/ubuntu bionic-security main restricted
#P deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
#P deb http://security.ubuntu.com/ubuntu bionic-security universe
#P deb-src http://security.ubuntu.com/ubuntu bionic-security universe
#P deb http://security.ubuntu.com/ubuntu bionic-security multiverse
#P deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu saucy partner
#deb-src http://archive.canonical.com/ubuntu saucy partner

# deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main # disabled on upgrade to bionic
# deb-src https://dl.winehq.org/wine-builds/ubuntu/ xenial mainGXGXG

在此处输入图片描述

peter@peter-HP-Compaq-2510p:~$ sudo apt-get update
Hit:1 http://archive.canonical.com/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease                                                           
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                                                   
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Fetched 163 kB in 2s (84,5 kB/s)                                
Reading package lists... Done
peter@peter-HP-Compaq-2510p:~$ 

答案1

sudo apt-get autoclean 

sudo apt-get autoremove 

这两个命令会清理旧的和未使用的包

相关内容