• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Ubuntu / On Ubuntu – Remove Repository From Apt And From Sources List

On Ubuntu – Remove Repository From Apt And From Sources List

By Sourabh / October 9, 2022 Category: How To, Ubuntu

How to remove repository on Ubuntu command line. On Ubuntu, remove repository from apt via command line. Ubuntu users can remove ppa and packages; remove repository from apt and from sources list.

Using apt-get to remove PPA

On Linux Ubuntu Systems, apt-get is the command-line tool for handling packages, and works as the user’s “back-end” to other tools using the APT library.

For removing or deleting PPA or packages, the following apt-get options are used:

  1. remove: remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed.
  2. purge: purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).
  3. autoremove (and the auto-remove alias since 1.1): autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.

Whenever we add a repository using ‘add-apt-repository’ command, it is stored in /etc/apt/sources.list file. However, if we add PPA repositories, we will have to examine /etc/apt/sources.list.d/ directory and delete the respective entry.

Ubuntu – Remove repository from apt

Run the following command to remove repository from apt:

sudo add-apt-repository --remove ppa:PPA_Name/ppa

Ubuntu – Remove repository from sources list

To remove the repository from sources list, first run the command to see all the PPAs added in the system. Use the following command:

ls /etc/apt/sources.list.d

Now look for the PPA you wish to remove/delete and then remove the .list file associated with the PPA using the following command:

sudo rm -i /etc/apt/sources.list.d/PPA_Name.list

Remove a PPA by using ppa-purge in the terminal

On Ubuntu, the PPA purge utility is not preinstalled. Type the showing command to install it:

sudo apt-get purge

Once installed, remove a PPA using ppa-purge command:

sudo ppa-purge ppa:<ppa-file>

Once the removal/deletion is completed, don’t forget to update the system.

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap