当前位置: 首页 > news >正文

How to remove PPA repository on Ubuntu and Debian

原文地址:How to remove PPA repository on Ubuntu and Debian

You might need to use a third-party apt repository when the packages you need are not available in the default repository, or if it is, it might not be the version you need.

You will need to delete the third-party or PPA (Personal Package Archives) repository once you no longer need them, or the one you've just added is not as what you initially expected them to be.

PPA repository can be removed using add-apt-repository tool from the terminal.

Steps to remove PPA repository on Ubuntu and Debian:

  1. Launch terminal.

  2. Search for the repository name from the list of installed apt repositories.
    $ apt-cache policy | grep ondrej
     500 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main i386 Packages
         release v=20.04,o=LP-PPA-ondrej-php,a=focal,n=focal,l=***** The main PPA for supported PHP versions with many PECL extensions *****,c=main,b=i386
     500 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 Packages
         release v=20.04,o=LP-PPA-ondrej-php,a=focal,n=focal,l=***** The main PPA for supported PHP versions with many PECL extensions *****,c=main,b=amd64
  3. Remove PPA repository using add-apt-repository.
    $ sudo add-apt-repository --remove ppa:ondrej/php
     Co-installable PHP versions: PHP 5.6, PHP 7.x and most requested extensions are included. Only Supported Versions of PHP (http://php.net/supported-versions.php) for Supported Ubuntu Releases (https://wiki.ubuntu.com/Releases) are provided. Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.
    
    Debian oldstable and stable packages are provided as well: https://deb.sury.org/#debian-dpa
    
    You can get more information about the packages at https://deb.sury.org
    
    BUGS&FEATURES: This PPA now has a issue tracker:
    https://deb.sury.org/#bug-reporting
    
    CAVEATS:
    1. If you are using php-gearman, you need to add ppa:ondrej/pkg-gearman
    2. If you are using apache2, you are advised to add ppa:ondrej/apache2
    3. If you are using nginx, you are advised to add ppa:ondrej/nginx-mainline
       or ppa:ondrej/nginx
    
    PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/
    
    WARNING: add-apt-repository is broken with non-UTF-8 locales, see
    https://github.com/oerdnj/deb.sury.org/issues/56 for workaround:
    
    # LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
     More info: https://launchpad.net/~ondrej/+archive/ubuntu/php
    Press [ENTER] to continue or Ctrl-c to cancel removing it.
  4. Update apt's package list.
    $ sudo apt update
    Hit:1 http://jp.archive.ubuntu.com/ubuntu focal InRelease
    Get:2 http://jp.archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]
    Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
    Get:4 http://jp.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB]
    Fetched 210 kB in 1s (258 kB/s)     
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    All packages are up to date.
  5. Update installed packages using latest package repository and lists.
    $ sudo apt dist-upgrade --assume-yes
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  6. Remove unnecessary packages from PPA.
    $ sudo apt remove --assume-yes php5.6
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php5.6 libapr1 libaprutil1
      libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php-common php5.6-cli php5.6-common php5.6-json
      php5.6-opcache php5.6-readline
    Use 'sudo apt autoremove' to remove them.
    The following packages will be REMOVED:
      php5.6
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    After this operation, 291 kB disk space will be freed.
    (Reading database ... 186098 files and directories currently installed.)
    Removing php5.6 (5.6.40-30+ubuntu20.04.1+deb.sury.org+1) ...
  7. Remove unnecessary dependencies from previously installed packages.
    $ sudo apt autoremove --assume-yes
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages will be REMOVED:
      apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php5.6 libapr1 libaprutil1
      libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php-common php5.6-cli php5.6-common php5.6-json
      php5.6-opcache php5.6-readline
    0 upgraded, 0 newly installed, 16 to remove and 0 not upgraded.
    After this operation, 24.0 MB disk space will be freed.
    (Reading database ... 186091 files and directories currently installed.)
    ##### snipped

Guide compatibility:

Operating System
Ubuntu 16.04 LTS (Xenial Xerus)
Ubuntu 16.10 (Yakkety Yak)
Ubuntu 17.04 (Zesty Zapus)
Ubuntu 17.10 (Artful Aardvark)
Ubuntu 18.04 LTS (Bionic Beaver)
Ubuntu 18.10 (Cosmic Cuttlefish)
Ubuntu 19.04 (Disco Dingo)

相关文章:

  • 用appimagelauncher安装markdown编辑工具marktext
  • ROS ERROR: “Qt5::Gui“ references the file “/usr/lib/x86_64-linux-gnu/libEGL.so“ not exist
  • Linux下使用nmap扫描端口
  • ​​​​​​​Installing ROS on the Raspberry Pi
  • Ubuntu系统下通过remmina远程登陆raspberry pi
  • Ubuntu 键盘鼠标失效怎么办
  • raspberry pi 4检查ch340/ch341驱动
  • ROS ERROR: Could NOT find depth_image_proc (missing: depth_image_proc_DIR)
  • 如何在 Ubuntu 服务器上安装桌面环境(GUI) | Linux 中国
  • Ubuntu Server 20.04.4 在树莓派上的体验之连接网络和WIFI(WLAN0)
  • Ubuntu ERROR: sudo: unable to resolve host ubuntu: Name or service not known
  • Ubuntu Server 20.04.4 在树莓派上的体验之ROS-Noetic的安装
  • ROS移植机器人小车:catkin_make过程中碰到的各种小问题
  • ROS移植机器人小车:问题集
  • ROS移植机器人小车:问题集(2)
  • 【Leetcode】101. 对称二叉树
  • [ 一起学React系列 -- 8 ] React中的文件上传
  • [译]CSS 居中(Center)方法大合集
  • 78. Subsets
  • Android开发 - 掌握ConstraintLayout(四)创建基本约束
  • React Native移动开发实战-3-实现页面间的数据传递
  • thinkphp5.1 easywechat4 微信第三方开放平台
  • 从0到1:PostCSS 插件开发最佳实践
  • 大主子表关联的性能优化方法
  • 分布式熔断降级平台aegis
  • 给github项目添加CI badge
  • 互联网大裁员:Java程序员失工作,焉知不能进ali?
  • 无服务器化是企业 IT 架构的未来吗?
  • 鱼骨图 - 如何绘制?
  • TPG领衔财团投资轻奢珠宝品牌APM Monaco
  • 阿里云API、SDK和CLI应用实践方案
  • 如何在招聘中考核.NET架构师
  • ​直流电和交流电有什么区别为什么这个时候又要变成直流电呢?交流转换到直流(整流器)直流变交流(逆变器)​
  • #android不同版本废弃api,新api。
  • (07)Hive——窗口函数详解
  • (ctrl.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MDd_DynamicDebug”不匹配值“
  • (八)Docker网络跨主机通讯vxlan和vlan
  • (二)windows配置JDK环境
  • (深度全面解析)ChatGPT的重大更新给创业者带来了哪些红利机会
  • (一)appium-desktop定位元素原理
  • (转)淘淘商城系列——使用Spring来管理Redis单机版和集群版
  • (转)为C# Windows服务添加安装程序
  • .form文件_SSM框架文件上传篇
  • .net core 6 集成和使用 mongodb
  • .net Signalr 使用笔记
  • .Net的C#语言取月份数值对应的MonthName值
  • .NET命名规范和开发约定
  • .NET企业级应用架构设计系列之开场白
  • /var/log/cvslog 太大
  • @Query中countQuery的介绍
  • @synthesize和@dynamic分别有什么作用?
  • [20160902]rm -rf的惨案.txt
  • [AIGC 大数据基础]hive浅谈
  • [Android] Implementation vs API dependency
  • [Android] Upload package to device fails #2720