LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ppa-purge

disable a Launchpad PPA and revert its packages to official versions

TLDR

Disable a PPA and downgrade its packages to the archive versions
$ sudo ppa-purge ppa:[owner]/[ppa_name]
copy
Disable a PPA given only its owner (the PPA name defaults to `ppa`)
$ sudo ppa-purge -o [owner]
copy
Disable a PPA given its owner and name as separate flags
$ sudo ppa-purge -o [owner] -p [ppa_name]
copy
Answer yes to all package manager prompts
$ sudo ppa-purge -y ppa:[owner]/[ppa_name]
copy
Use a specific distribution instead of the detected one
$ sudo ppa-purge -d [noble] ppa:[owner]/[ppa_name]
copy
Display help
$ ppa-purge -h
copy

SYNOPSIS

ppa-purge [-h] [-d distribution] [-s host] [-p ppaname] [-o ppaowner] [-y] [-i] [ppa: ppaowner[/ppaname]]

DESCRIPTION

ppa-purge is a bash script that disables a Launchpad Personal Package Archive (PPA) and downgrades packages that came from that PPA back to the versions in the official Ubuntu archive. Packages that exist only in the PPA are uninstalled. Removing a PPA with add-apt-repository --remove leaves the installed versions in place; ppa-purge is the rollback for that case.The PPA may be given as `ppa:owner/name`, as a bare `owner/name`, or as --o / -p flags. When the name is omitted it defaults to ppa, matching Launchpad's default archive name.The script must run as root because it calls the package manager. It comments out the matching source list entries, generates a revert list, and installs the archive versions.

PARAMETERS

-p ppaname

PPA name to disable (default: ppa)
-o ppaowner
Launchpad PPA owner. If omitted, the owner is taken from the `ppa:owner[/name]` argument
-s host
Repository server (default: ppa.launchpad.net)
-d distribution
Override the detected Ubuntu distribution (for example noble or jammy)
-y
Pass -y --force-yes to apt-get, or -y to aptitude
-i
Prefer aptitude over apt-get (the default prefers apt-get)
-h
Display usage help and exit

INSTALL

sudo apt install ppa-purge
copy

CAVEATS

ppa-purge is Ubuntu-specific (package in the universe pocket). It does not delete the source list file; it disables the PPA. If a run fails (for example because another package manager is holding the lock), uncomment the PPA, run apt-get update, and try again. Packages with no counterpart in the official archive may remain installed and have to be removed by hand. Using -y skips the review of the proposed downgrade list.

HISTORY

ppa-purge was written for Ubuntu to undo PPA upgrades. The man page is dated 2010 (Lorenzo De Liso). Ubuntu later switched the default Launchpad host in packaging notes to ppa.launchpadcontent.net; the script's -s default remains ppa.launchpad.net.

SEE ALSO

RESOURCES

Copied to clipboard
Kai