咸鱼

咸鱼是以盐腌渍后,晒干的鱼

0%

Ubuntu 删除PPA源

添加一个PPA源

1
$ sudo add-apt-repository ppa:user/ppa-name

PPA源失效

如mongodb的源失效,每次 apt update 都会有错误提示。

1
2
3
4
5
6
7
8
9
10
11
root@bogon:~# apt-get update         
Ign:7 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 InRelease
Get:8 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release [3,457 B]
Get:9 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release.gpg [801 B]
Err:9 https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release.gpg
The following signatures were invalid: KEYEXPIRED 1544811256
Fetched 329 kB in 5s (60.8 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 Release: The following signatures were invalid: KEYEXPIRED 1544811256
W: Failed to fetch https://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.6/Release.gpg The following signatures were invalid: KEYEXPIRED 1544811256
W: Some index files failed to download. They have been ignored, or old ones used instead.

删除PPA源

进入 /etc/apt/sources.list.d/ 目录删除相关文件即可

1
2
3
4
5
6
7
8
9
10
11
root@bogon:~# cd /etc/apt/sources.list.d/
root@bogon:/etc/apt/sources.list.d# ls
djcj-hybrid-trusty.list kirillshkrogalev-ffmpeg-next-trusty.list.save mongodb-org-3.6.list.save openjdk-r-ppa-trusty.list.save
djcj-hybrid-trusty.list.distUpgrade mongodb-org-3.4.list nginx-ubuntu-stable-xenial.list rabbitmq.list
djcj-hybrid-trusty.list.save mongodb-org-3.4.list.distUpgrade nginx-ubuntu-stable-xenial.list.save rabbitmq.list.distUpgrade
kirillshkrogalev-ffmpeg-next-trusty.list mongodb-org-3.4.list.save openjdk-r-ppa-trusty.list rabbitmq.list.save
kirillshkrogalev-ffmpeg-next-trusty.list.distUpgrade mongodb-org-3.6.list openjdk-r-ppa-trusty.list.distUpgrade
root@bogon:/etc/apt/sources.list.d#
root@bogon:/etc/apt/sources.list.d#
root@bogon:/etc/apt/sources.list.d#
root@bogon:/etc/apt/sources.list.d# rm mongodb-org-3.*