add-apt-repository
명령을 사용하여 많은 PPA를 추가했습니다.이러한 PPA를 제거하는 간단한 방법이 있습니까?/etc/apt/sources.list
에서 적절한 deb 라인을 확인했지만 거기에 없습니다.
이것은 서버 시스템에 있으므로 명령 행 솔루션이 훌륭합니다!
add-apt-repository
명령을 사용하여 많은 PPA를 추가했습니다.이러한 PPA를 제거하는 간단한 방법이 있습니까?/etc/apt/sources.list
에서 적절한 deb 라인을 확인했지만 거기에 없습니다.
이것은 서버 시스템에 있으므로 명령 행 솔루션이 훌륭합니다!
There are a number of options:
Use the --remove
flag, similar to how the PPA was added:
sudo add-apt-repository --remove ppa:whatever/ppa
You can also remove PPAs by deleting the .list
files from /etc/apt/sources.list.d
directory.
As a safer alternative, you can install ppa-purge:
sudo apt-get install ppa-purge
And then remove the PPA, downgrading gracefully packages it provided to packages provided by official repositories:
sudo ppa-purge ppa:whatever/ppa
Note that this will uninstall packages provided by the PPA, but not those provided by the official repositories. If you want to remove them, you should tell it to apt:
sudo apt-get purge package_name
Last but not least, you can also disable or remove PPAs from the "Software Sources" section in Ubuntu Settings with a few clicks of your mouse (no terminal needed).
You can use the
sudo ppa-purge ppa:repository-name/subdirectory
command in a terminal.
You will first need to install ppa-purge
to use this command. To do so, use sudo apt-get install ppa-purge
or click this button:
Find out more about it here.
You can manage your repositories in System > Administration > Software Sources
You can also remove them in /etc/apt/sources.list.d/
where you'll find a <repo>-ppa-<distro>.list
file You can remove that file or simply comment out the deb line
Depending if add-apt-repository was invoked with a full sources.list line or a ppa it appends the line to /etc/apt/sources.list or a new file in the /etc/apt/sources.list.d/ directory. If it's a ppa it will then import the ppa GPG key into apt's keyring
To reverse the actions done by add-apt-repository you can either manually remove the apt line or use a tool like "Software Sources" to do it and then remove the GPG key using apt-key like so:
"sudo apt-key list" to find out the id for the repository you want to remove and then
"sudo apt-key del id" where is looks like 7FAC5991. The id is the part after the "/" character.
The answers to this question will help you.
You can manage PPAs in System > Administration > Software Sources
or by removing files in /etc/apt/sources.list.d/
.
You can also use a package called ppa-purge.
And, as I commented on the question I linked to above,
There is a bug on Launchpad requesting a --remove argument for the add-apt-repository command. I've submitted a merge request to get the feature implemented, but it hasn't yet been accepted. Hopefully you'll have this feature soon though.
OMG!Ubuntu! mentioned that this feature had been added to the 'Tweak' PPA.
Presumably once it's in universe, you'll be able to use it to remove itself :)
add-apt-repository now accepts a --remove argument.
https://bugs.edge.launchpad.net/ubuntu/+bug/446216
I proposed adding a rm-apt-repository command as well:
https://code.edge.launchpad.net/~bryceharrington/software-properties/rm-apt-repository/+merge/25988
Since Ubuntu Maverick (10.10) add-apt-repository
accepts a -r
or --remove
parameter which removes the PPA in the same way you installed it. :)
So:
Install: sudo apt-add-repository ppa:user/repository
Uninstall: sudo apt-add-repository -r ppa:user/repository
There's a command, add-apt-repository -r
.
But deleting the file and re-running sudo apt-get update
is also fine.
Apart from the solution mentioned already: If you still have software installed from that repository, it is best to revert them to the original version supplied with ubuntu: the one from the ppa will not get (security and other) updates anymore. There is a tool that will do just that: ppa-purge http://packages.ubuntu.com/maverick/ppa-purge
Some people might prefer to add and remove repositories via a GUI. As of Ubuntu 10.10, this requires a bit of extra work. An explanation is available on the wiki. In order to try and have all answers for this question available in one place, I will try and summarize the important details here. Be sure to check the wiki (especially once a new version of Ubuntu is released) to ensure that this process is still valid.
First, you will want to re-enable 'Software Sources' in the System->Administration menu. Right click on the Applications/Places/System menu and click 'Edit Menus'.
This will open a window, scroll down and click on 'Administration'. Check the box next to 'Software Sources' and then click the 'Close' button.
Go to System->Administration and you should see 'Software Sources' in the menu.
In the window that opens, click on the 'Other Software' tab at the top.
You should see all of the repositories that you have added (including the PPAs added via add-apt-repository). You can temporarily disable a repository by unchecking the box next to it. To remove a repository permanently, highlight it and click on the 'Remove' button. When you are done, hit the 'Close' button.
As Marcel Stimberg noted earlier:
This will remove the PPA from the repository list but if the package is a newer version of one in the standard repos, you have to manually downgrade the package afterwards. ppa-purge (see other answer) does that for you.
Hopefully, this will help.
If you are talking about the actual applications installed via a PPA, they will be listed just as any other application and you would uninstall it the same way. The PPAs (repositories) themselves will be listed under the 'Other Software' tab of the Settings->Repositories menu. They can be removed just like any other source.
You can use Ubuntu-Tweak, which makes it very easy to edit ppa. You can delete the ppa's manually or when Ubuntu-Tweak know it just click a button.
It depends. If you've installed a new application from a ppa, then you can uninstall it normally. However, if you've enabled a ppa to get a newer version of a program that you've alredy installed (Firefox 4,newer Xorg drivers,etc), then you need to use a program called ppa-purge.
Ppa-purge is available in the repositories for Maverick and newer. A backport is available for Lucid users. Just install it and then run
sudo ppa-purge ppa:repository-name/directory
The above command will disable the ppa from your software sources and then reinstall the official version of the upgraded application from the Ubuntu repository.
You can try those command below and it works very well for me to remove Linux kernel 3.5 (ppa:xorg-edgers/ppa).
sudo apt-get install ppa-purge
sudo ppa-purge ppa:<XXX>/<YYY>
Simply run apt-add-repository again with the --remove
option to remove a PPA added via the command-line, for example:
sudo apt-add-repository --remove ppa:kernel-ppa/ppa
Then update with:
sudo apt-get update
Run Ubuntu Software Center and from the menu choose "Software Sources" - there you can add/edit/remove repositories.
Alternately, as ppas
are stored in /etc/apt/sources.list.d
you can find the one you want to remove by entering:
ls /etc/apt/sources.list.d
Then when you have noted the name of that offending ppa (e.g. myppa.list
), you can enter:
sudo rm -i /etc/apt/sources.list.d/myppa.list
Take care with rm (hence why I have used the interactive switch so you can confirm your actions. Then run sudo apt-get update
afterwards.
This method merely removes the ppa .list
file; it does not remove any other files or sort out any other problems caused by the ppa
; for that you could use ppa-purge
after you have got your update ability back (I know you mentioned this in your question, but I am adding this point for future readers): see here for more information on ppa-purge
.
Also take into account that if you previously added the key of the repo as trusted you should remove it:
# list the trusted keys
sudo apt-key list
# remove the key
sudo apt-key del KEY_ID
Run these commands:
sudo add-apt-repository --remove ppa:kernel-ppa/ppa
sudo apt-get update
ppa-purge
is your friend. It automatically uninstalls whatever you installed via the ppa and then removes the ppa.
Install ppa-purge via:
sudo apt-get install ppa-purge
and the use it like this:
sudo ppa-purge ppa-url
Viola.
Most simple way to delete all of your PPA'a is this:
cd /etc/apt/sources.list.d && sudo rm -i *list*
It will first take you to the directory which contains sources.list.d
and then rm (remove) basically all files with word list in their name.
You can use y-ppa-manager
Installation :
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager
Use :
Open Y PPA Manager and select Manage PPAs
Select the PPA you want to remove and click the Remove
button
In Linux Mint there is no --remove
or -r
switch
on add-apt-repository
. If you want to remove a repository, you'll have to do it manually. It's not hard:
List all installed repositories.
ls /etc/apt/sources.list.d
This lists, for example:
getdeb.list natecarlson-maven3-trusty.list official-package-repositories.list
Find the name of the repository you want to remove.
In my case I want to remove natecarlson-maven3-trusty.list
.
Remove the repository.
sudo rm -i /etc/apt/sources.list.d/natecarlson-maven3-trusty.list
List all the GPG keys.
apt-key list
This lists, for example:
/etc/apt/trusted.gpg
--------------------
pub 1024D/437D05B5 2004-09-12
uid Ubuntu Archive Automatic Signing Key <[email protected]>
sub 2048g/79164387 2004-09-12
pub 1024D/FBB75451 2004-12-30
uid Ubuntu CD Image Automatic Signing Key <[email protected]>
pub 4096R/46D7E7CF 2009-05-15
uid GetDeb Archive Automatic Signing Key <[email protected]>
pub 1024R/3DD9F856 2011-04-15
uid Launchpad PPA for Nate Carlson
Find the key ID for the key you want to remove. The key ID is the part after the /
.
In my case I want to remove the Nate Carlson key, so the ID is 3DD9F856
.
Remove the key.
sudo apt-key del 3DD9F856
Update the package lists.
sudo apt-get update
Done!
Using add-apt-repository
Note: This solution does not remove/downgrade packages associated with the repository.
The add-apt-repository
command has an option to remove a repository, which is specified with -r
. You just need to know the PPA you want to send on its way. Use the command below:
sudo add-apt-repository -r ppa:REPOSITORY/HERE
... changing "PPA/HERE" to the PPA you are removing.
Source: HOW TO USE A LAUNCHPAD PPA (ADD, REMOVE, PURGE, DISABLE) IN UBUNTU
Using ppa-purge
Note: This solution will purge PPA, & downgrade all packages from it.
To install use:
sudo apt install ppa-purge
To use ppa-purge
you'd do:
sudo ppa-purge ppa:REPOSITORY/HERE
... changing "REPOSITORY/HERE" to the repository you are removing.
Source: REMOVE OR PURGE PPA REPOSITORIES VIA COMMAND LINE [QUICK UBUNTU TIP]
Using Software&Updates
Note: This solution does not remove/downgrade packages associated with the repository.
Search "Software & Updates" (or software-properties-gtk
) & launch it then choose tab -> "Other Software". To remove a repository, uncheck it, then click "Close", & lastly "Refresh".
Create this function (add it to wherever you store your functions) and then run with the appropriate ppa name:
rmppa()
{
sudo -- sh -c 'rm /etc/apt/sources.list.d/"$1".list ; apt-get update'
}
rmppa snagglepuss
Add error checking (non-existent parameter, for example) if you desire...
All these answers are fine, but to me the easiest way is still to remove them directly using rm -rf.
Imagine that apt update gives you the following error:
W: Failed to fetch http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/dists/trusty/main/binary-amd64/Packages 403 Forbidden
Then you can fix it doing something like :
sudo rm -rf /etc/apt/sources.list.d/andrej*