How to Remove PPA from Ubuntu 26.04, 24.04 and 22.04

Remove PPA from Ubuntu 26.04, 24.04 and 22.04. Delete .sources or .list files, refresh APT, and clean leftover packages with ppa-purge.

Last updatedAuthorJoshua JamesRead time8 minGuide typeUbuntu

Broken upgrade warnings, stale repository metadata, and package conflicts often trace back to a source you no longer need. When you need to remove a PPA from Ubuntu 26.04, 24.04, or 22.04, remember that a Launchpad PPA is just one kind of APT repository entry. The safest path is to check which packages it supplied first, then choose between a quick source removal and a full rollback to Ubuntu’s packaged version.

Ubuntu 26.04 and 24.04 usually store Launchpad PPAs as DEB822 .sources files, while Ubuntu 22.04 still commonly uses legacy .list entries. The same workflow lets you find PPA source files, remove them with add-apt-repository or manual cleanup, use ppa-purge when downgrades matter, and clean up any disabled source file left behind afterward.

List PPAs on Ubuntu

Find PPA Source Files in sources.list.d on Ubuntu

Start by searching the APT source directory for Launchpad PPA entries. A Launchpad PPA is one kind of APT repository, so the source file under /etc/apt/sources.list.d/ is what controls whether APT still reads it.

grep -Ril 'ppa.launchpad' /etc/apt/sources.list.d/

No output means no Launchpad PPA files were found in that directory. Newer Ubuntu releases usually name Launchpad PPA files as owner-ubuntu-ppa-codename.sources, while older entries can still appear as .list files. A disabled source can still appear in this search, so inspect the file if you need to confirm whether it is active.

Ubuntu 26.04 and 24.04 create .sources files for newly added Launchpad PPAs, while Ubuntu 22.04 still uses a .list file in many cases. The removal workflow works across all three supported Ubuntu LTS releases.

Example Output from sources.list.d on Ubuntu

linuxcapable@ubuntu-26-04:~$ grep -Ril 'git-core/ppa' /etc/apt/sources.list.d/
/etc/apt/sources.list.d/git-core-ubuntu-ppa-resolute.sources

If the PPA filename appears in this directory, APT still has a source entry for it.

Verify Which Packages Came From the PPA on Ubuntu

Before removing a PPA, check whether it still provides a package you care about. Replace <package> with the package name you want to inspect.

apt-cache policy <package>
dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package} ${Version}\n' <package> | grep '^ii'

apt-cache policy shows which repositories still offer the package, while the dpkg-query check confirms whether it is installed already. If the PPA URL still appears in the version table, removing the source can change future upgrades or reinstall behavior.

linuxcapable@ubuntu-26-04:~$ apt-cache policy git | grep -F "https://ppa.launchpadcontent.net/git-core/ppa/ubuntu"
  500 https://ppa.launchpadcontent.net/git-core/ppa/ubuntu resolute/main amd64 Packages

That line confirms the package metadata still includes the PPA.

Remove a PPA from Ubuntu

Three practical ways are available for removing a PPA. The best option depends on whether you want to keep the installed package version, delete the source file manually, or force packages back to Ubuntu’s archive version.

MethodWhat It ChangesKeeps Current Packages?Best For
add-apt-repository --removeRemoves the Launchpad source entry through Ubuntu’s repository toolYesNormal cleanup when you only need the PPA gone
Manual file removalDeletes the .sources or .list file directlyYesBroken or hand-edited entries that add-apt-repository cannot match
ppa-purgeDisables the PPA and makes Ubuntu prefer archive versions againNo, it can downgrade or remove packagesSystems that need a clean rollback from PPA packages
  • Use add-apt-repository --remove when you want the quickest way to stop using a PPA.
  • Delete the source file manually when the repository was added by hand or the PPA name no longer resolves cleanly.
  • Use ppa-purge when the current package version from the PPA is causing trouble and you want Ubuntu to prefer its own package again.

Remove a PPA with add-apt-repository on Ubuntu

Use add-apt-repository --remove on Ubuntu

This is the fastest option when the PPA was added normally through Ubuntu’s repository tools. The -y flag accepts the confirmation prompt automatically.

These commands use sudo for administrative privileges. If your account is not in the sudoers file yet, add a new user to sudoers on Ubuntu before continuing.

sudo add-apt-repository -y --remove ppa:username/ppa-name

If add-apt-repository is missing on a minimal or server install, refresh APT first and install software-properties-common. The graphical software-properties-gtk package is not required for this command-line workflow.

sudo apt update
sudo apt install -y software-properties-common

Example: Remove the Git Core PPA on Ubuntu

To remove the Git Core PPA that was added as ppa:git-core/ppa, run the command with the Launchpad PPA name instead of the local filename.

sudo add-apt-repository -y --remove ppa:git-core/ppa

Afterward, refresh APT and verify that the source file is gone and the package metadata no longer references the PPA.

sudo apt update
grep -Ril 'git-core/ppa' /etc/apt/sources.list.d/
apt-cache policy git | grep -F "https://ppa.launchpadcontent.net/git-core/ppa/ubuntu"
linuxcapable@ubuntu-26-04:~$ grep -Ril 'git-core/ppa' /etc/apt/sources.list.d/
linuxcapable@ubuntu-26-04:~$ apt-cache policy git | grep -F "https://ppa.launchpadcontent.net/git-core/ppa/ubuntu"

No output from either check means the PPA is no longer active.

Delete PPA Source Files Manually on Ubuntu

Remove PPA Source Files Directly on Ubuntu

Manual cleanup is the fallback when the PPA name is unknown, the entry was edited by hand, or add-apt-repository reports that the PPA is not present. Identify the exact file first so you do not remove an unrelated repository.

grep -Ril 'ppa.launchpad' /etc/apt/sources.list.d/

Print the first few lines before deleting the matching file. This is especially useful on Ubuntu 24.04 and 26.04 where the PPA data lives in a DEB822 .sources file.

sed -n '1,12p' /etc/apt/sources.list.d/username-ppa-name.sources
Types: deb
URIs: https://ppa.launchpadcontent.net/git-core/ppa/ubuntu/
Suites: resolute
Components: main
Signed-By:
 -----BEGIN PGP PUBLIC KEY BLOCK-----

After you confirm the file belongs to the PPA you want to remove, delete only that matching source file. Use the .sources command for DEB822 entries or the .list command for legacy entries.

sudo rm -f /etc/apt/sources.list.d/username-ppa-name.sources
sudo rm -f /etc/apt/sources.list.d/username-ppa-name.list

Ubuntu 22.04 often stores the same PPA as a simpler one-line .list entry such as deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu/ jammy main.

Ubuntu 22.04 can also leave helper-generated trust files such as /etc/apt/trusted.gpg.d/git-core-ubuntu-ppa.gpg after a PPA source is removed. Delete those only when the filename clearly belongs to the same PPA; Ubuntu 24.04 and 26.04 commonly embed the Launchpad key inside the .sources file instead.

find /etc/apt/trusted.gpg.d -maxdepth 1 -name 'git-core-ubuntu-ppa.gpg*' -print
sudo rm -f /etc/apt/trusted.gpg.d/git-core-ubuntu-ppa.gpg
sudo rm -f /etc/apt/trusted.gpg.d/git-core-ubuntu-ppa.gpg~

Verify Manual PPA Removal on Ubuntu

Refresh APT after deleting the file, then verify that the PPA URL no longer appears in package metadata.

sudo apt update
apt-cache policy git | grep -F "https://ppa.launchpadcontent.net/git-core/ppa/ubuntu"
linuxcapable@ubuntu-26-04:~$ apt-cache policy git | grep -F "https://ppa.launchpadcontent.net/git-core/ppa/ubuntu"

An empty result means APT no longer has package metadata from that PPA.

Clean Up Packages After Removing a PPA on Ubuntu

Remove Orphaned Packages After PPA Removal on Ubuntu

Removing the source does not remove packages that were already installed from it, and it does not downgrade PPA packages back to Ubuntu’s archive. Use apt autoremove only for dependencies that APT now considers unused.

sudo apt autoremove --dry-run

Review the preview before removing anything. If the list contains only packages you no longer need, run the real cleanup interactively.

sudo apt autoremove

Shared libraries or helper packages can still matter to other software you plan to keep. Use ppa-purge instead of apt autoremove when your real goal is to roll packages back to Ubuntu’s own versions.

For broader package cleanup, see how to remove packages on Ubuntu using the command line. When the PPA is gone and the system is clean again, use the guide to update packages via Ubuntu command line so APT refreshes and upgrades from the repositories you still trust.

Use ppa-purge to Roll Back a PPA on Ubuntu

Install ppa-purge on Ubuntu

Use ppa-purge when you want Ubuntu to prefer archive packages again instead of keeping the PPA version. This is also the right tool when Ubuntu’s release upgrader warns that unofficial packages from a Launchpad PPA need to be removed before the upgrade can continue.

sudo apt update
sudo apt install -y ppa-purge

If Ubuntu reports that ppa-purge has no installation candidate, enable Universe first. The package is available from Universe on supported Ubuntu releases, so start with enable Universe and Multiverse on Ubuntu and then rerun the install command.

A package-policy check confirms that ppa-purge is installed and available from Ubuntu’s Universe component.

apt-cache policy ppa-purge
linuxcapable@ubuntu-26-04:~$ apt-cache policy ppa-purge
ppa-purge:
  Installed: 0.2.8+bzr63-0ubuntu4
  Candidate: 0.2.8+bzr63-0ubuntu4
  Version table:
 *** 0.2.8+bzr63-0ubuntu4 500
        500 http://au.archive.ubuntu.com/ubuntu resolute/universe amd64 Packages
        100 /var/lib/dpkg/status

Run ppa-purge on Ubuntu

The ppa-purge command disables the PPA and makes Ubuntu prefer its own package version again. Let the command stay interactive so you can review the proposed downgrade or removal list before continuing.

sudo ppa-purge ppa:username/ppa-name

Example: Purge the Git Core PPA on Ubuntu

When you want Git to come from Ubuntu’s archive again instead of the Git Core PPA, purge the Launchpad entry directly.

sudo ppa-purge ppa:git-core/ppa

Relevant output should name the PPA, generate a package revert list, and finish successfully after you accept the proposed changes.

linuxcapable@ubuntu-26-04:~$ sudo ppa-purge ppa:git-core/ppa
Updating packages lists
PPA to be removed: git-core ppa
Package revert list generated:
PPA purged successfully

After the purge completes, confirm that the PPA URL no longer appears in package metadata.

apt-cache policy git | grep -F "https://ppa.launchpadcontent.net/git-core/ppa/ubuntu"
linuxcapable@ubuntu-26-04:~$ apt-cache policy git | grep -F "https://ppa.launchpadcontent.net/git-core/ppa/ubuntu"

An empty result means the PPA is no longer active in APT, even if a disabled source file still exists on disk.

Clean Up Disabled PPA Source Files After ppa-purge on Ubuntu

On Ubuntu 24.04 and 26.04, ppa-purge can leave the PPA file behind with Enabled: no in the DEB822 entry. That disables the repository correctly, but you may still want to delete the leftover file for a cleaner /etc/apt/sources.list.d/ directory.

grep -Ril '^Enabled: no' /etc/apt/sources.list.d/
sudo sed -n '1,8p' /etc/apt/sources.list.d/username-ppa-name.sources
sudo rm -f /etc/apt/sources.list.d/username-ppa-name.sources
sudo apt update

The first command searches the source directory recursively and prints only filenames that contain Enabled: no, which makes it easier to spot leftover disabled DEB822 entries. Inspect the file before deleting it so a disabled but unrelated source is not removed by mistake.

Ubuntu 22.04 can leave the old .list file and matching helper trust files behind after ppa-purge too. Inspect the legacy source file, then remove only the exact source and trust filenames that belong to the same PPA.

sudo sed -n '1,4p' /etc/apt/sources.list.d/username-ppa-name.list
sudo rm -f /etc/apt/sources.list.d/username-ppa-name.list
sudo rm -f /etc/apt/trusted.gpg.d/username-ubuntu-ppa-name.gpg
sudo rm -f /etc/apt/trusted.gpg.d/username-ubuntu-ppa-name.gpg~
sudo apt update

Troubleshoot PPA Removal Problems on Ubuntu

Fix “Repository Does Not Have a Release File” Errors on Ubuntu

This error usually means a stale PPA entry is still present and APT keeps trying to refresh a release suite the PPA no longer publishes. Remove the matching file from /etc/apt/sources.list.d/, then refresh APT again. If the message says the release file is not valid yet, check the system clock first because time skew can produce a different APT error.

Use the same source-removal approach when a PPA you no longer want triggers signature warnings or release-label change messages. Do not accept new release metadata just to quiet a repository you plan to delete.

grep -Ril 'ppa.launchpad' /etc/apt/sources.list.d/
sudo rm -f /etc/apt/sources.list.d/username-ppa-name.sources
sudo rm -f /etc/apt/sources.list.d/username-ppa-name.list
sudo apt update

Do not replace ppa.launchpadcontent.net with an arbitrary mirror. Launchpad PPAs are served from Launchpad’s PPA host; if that host or suite no longer works for your Ubuntu release, remove the stale source or switch to a maintained repository that publishes packages for that release.

Handle add-apt-repository PPA not found Errors on Ubuntu

When add-apt-repository --remove says the PPA is not present, the source was usually added manually, renamed, or already disabled. Switch to manual file removal and identify the exact filename under /etc/apt/sources.list.d/ instead of retrying the same Launchpad name.

Resolve PPA Packages Without Ubuntu Replacements

Some PPAs carry software that Ubuntu does not package at all. Before you purge the source, decide whether you want an alternative installation path or whether you still need that software.

  • Search Flathub with flatpak search package-name if the software is available there.
  • Check whether the upstream project offers an official .deb package or vendor repository.
  • Keep the PPA temporarily if Ubuntu has no replacement yet and you still depend on that package.

Conclusion

Removing a PPA from Ubuntu is safest when source cleanup, package rollback, and unused dependency cleanup stay separate. Use add-apt-repository --remove or exact file removal for the source, ppa-purge when packages need to return to Ubuntu’s archive versions, and update packages via Ubuntu command line after the stale repository is gone.

Share this guide

Help another Linux user troubleshoot faster

Share this guide with someone troubleshooting Linux systems or saving it for later.

Follow LinuxCapable

Want more LinuxCapable guides in Google?

Add LinuxCapable as a preferred source so Google can show more of our fresh Linux tutorials in Top Stories and From your sources when relevant.

Add LinuxCapable as a preferred source on Google
Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffeeBuy me a coffee
Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<blockquote>quote</blockquote> quote block

Got a Question or Feedback?

We read and reply to every comment - let us know how we can help or improve this guide.

Verify before posting: