一部のUbuntuリポジトリが誤ってDebianにダウンロードされました。どのように削除しますか?

一部のUbuntuリポジトリが誤ってDebianにダウンロードされました。どのように削除しますか?

誤ってDebianからいくつかのUbuntuリポジトリをダウンロードしました。これでシステムを更新しようとすると、sudo apt-get update次のようになります。

W: The repository 'http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu cosmic Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://ppa.launchpad.net/gophers/archive/ubuntu bionic InRelease: Ondorengo sinadurak ezin dira egiaztatu gako publikoa ez bait dago eskuragarri: NO_PUBKEY 308C15A29AD198E9
W: The repository 'http://ppa.launchpad.net/gophers/archive/ubuntu bionic InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Ezin da lortu http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu/dists/cosmic/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

問題を解決するためにリポジトリを削除するにはどうすればよいですか?

ベストアンサー1

以前にリポジトリを追加した場合は、apt-add-repositoryこのオプションを使用して同じコマンドを再実行してください-r

sudo add-apt-repository -r ppa:webupd8team/y-ppa-manager

使用できない場合や使用したくない場合は、add-apt-repositoryリポジトリを手動で削除できます。それらは/etc/apt/sources.listディレクトリまたはファイルに書き込まれます/etc/apt/sources.list.d/。どのファイルが原因であるかを確認するには、次の手順を実行します。

grep y-ppa-manager /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources

何かを追加した場合は、/etc/apt/sources.list次のコマンドを使用して編集してください。

sudoedit /etc/apt/sources.list

問題のある行を削除してください。ファイル内のすべてのエントリを削除するには、/etc/apt/sources.list.d次のコマンドを使用してファイルを完全に削除できます。

sudo rm /etc/apt/sources.list.d/y-ppa-manager.list

PPAに関連しないバグもありますgophers/archive。必要に応じて設定作業を進めてください。パッケージアーカイブを使用可能にするには、次の3つの作業を行う必要があります。

  1. ソースリスト(/etc/apt/sources.list*)に追加してください。
  2. アーカイブが署名されている場合(セキュリティ上の理由で強くお勧めします)、実行によってそのキーを信頼することを示す必要があります。sudo apt-key add filename.key
  3. ランニングsudo apt-get update

ppa:この構文を使用すると、ステップapt-add-repository1と2が同時に処理されます。お使いのコンピュータでは手順2が行われていないようです。私の考えでは、あなたが走ることができると思いますadd-apt-repositoryPPAページのガイドライン) 処理させていただきます。または、以下を追加できます。手動で

apt-key adv --keyserver keyserver.ubuntu.com --recv-key C73998DC9DFEA6DCF1241057308C15A29AD198E9

keyserver.ubuntu.comすべてのUbuntu PPAキーのキーサーバーです。PPAページの署名鍵リンク行く最後の16進文字列は、PPAページにリストされている指紋です(エラーメッセージでより短い形式を使用することもできます)。

おすすめ記事