How To Use A Launchpad PPA (Add, Remove, Purge, Disable) In Ubuntu

11:12 PM

Here we are, talking about installing stuff from PPAs, but we've never posted more about the PPAs themselves. So here's a short guide on how to use a Launchpad PPA in Ubuntu.

Launchpad PPAs ("Personal Package Archive") are repositories hosted on Launchpad which you can use to install (or upgrade) packages that are not available in the official Ubuntu repositories.

The packages are built on the Launchpad servers (not on the users' computers), for the specified Ubuntu version(s). Because the packages are built against a certain Ubuntu version, it's not recommended to use them in Debian for instance (they might not be compatible and can cause conflicts).


How to add a PPA


how to add a PPA

A PPA can be added either from the command line or using a GUI.

Add a PPA from the command line: I guess you already know that you can add a PPA using the "add-apt-repository" command, but in case you're new to PPAs, here's how to do it:
sudo add-apt-repository ppa:someppa/ppa

Example:
sudo add-apt-repository ppa:webupd8team/gnome3

After adding a PPA, you'll also need to update your software sources, so the packages available in this newly added PPA can be "seen" by your computer. This can be done using the following command:
sudo apt-get update


how to add a PPA using a gui

Add a PPA using a GUI (Ubuntu Software Center / Software Sources): A PPA can be added using a GUI too. To do this, open "Software Sources" - in recent Ubuntu versions, this can be done by going to Ubuntu Software Center > Edit > Software Sources. Then, on the "Other Software" tab, click "Add" and enter the PPA under the same "ppa:someppa/ppa" form. 

The Launchpad blog has posted a video on how to do this, a while back:




As you can see in the video above, adding a PPA this way also updates the software sources so you don't have to run "sudo apt-get update".


How to remove (delete) a PPA


To remove a PPA means to only delete the repository from your system, without removing any packages you may have installed / upgraded from that PPA. 


how to remove a ppa ubuntu

Here is how to remove a PPA using the command line:
sudo add-apt-repository --remove ppa:someppa/ppa

Example:
sudo add-apt-repository --remove ppa:webupd8team/gnome3


how to remove a ppa ubuntu gui

Remove a PPA using a GUI: A PPA can also be removed by opening Software Sources (Ubuntu Software Center > Edit > Software Sources), then going to the "Other Software" tab, selecting the PPA you want to remove and then clicking the "Remove" button.

Each PPA should have two lines here, one for the compiled packages and one for the source, so remove both lines.

There's also a third method of removing a PPA: by deleting the .list file from /etc/apt/sources.list.d (see below).


The PPA .list file



When you add a PPA, a new .list file is created under /etc/apt/sources.list.d/. The files are named based on the PPA name and your Ubuntu version, like this: "someppa-ppa-oneiric.list".

Example: when adding the ppa:webupd8team/gnome3 PPA in Ubuntu Oneiric, the list file should look like this "webupd8team-gnome3-oneiric.list".

Here's how a .list file content looks like:
deb http://ppa.launchpad.net/webupd8team/gnome3/ubuntu oneiric main
deb-src http://ppa.launchpad.net/webupd8team/gnome3/ubuntu oneiric main

Like I've explained above, each PPA should have two lines here, one for the compiled packages (first) and one for the source code (second).

It's good to know where these .list files are located in case you add a PPA and want to edit it: either because of a bug that doesn't add it correctly (I've seen it quite often), or because you want to modify the Ubuntu version (in my example above, you would need to replace "oneiric" with some other Ubuntu version) in case you move the PPAs to another computer running a different Ubuntu version, manually enable/disable the PPAs (adding "#" in front of a PPA line disables it) and so on. Some of thse operations can also be performed using Software Sources (already covered in this post).



How to disable a PPA


Disabling a PPA means you won't receive any updates from that PPA anymore, but it does not remove any installed / upgraded packages. The advantage of disabling a PPA instead of removing it is that you can easily re-enable it.

To disable a PPA, open Software Sources (Ubuntu Software Center > Edit > Software Sources) and uncheck the box next to the PPA you want to disable. Remember to disable both lines: the main and the source code line.

In the same way you can also re-enable a PPA.



How to purge a PPA


Purging a PPA means not only to disable the PPA, but also to downgrade any packages you've upgraded from that PPA, to the version available in the official Ubuntu repositories.


how to purge a PPA Ubuntu

Here's an example: let's say you've added the Unity Staging PPA in Ubuntu 12.04 and upgraded to the latest Unity from trunk. Something goes wrong and you want to go back to the Unity version available in the official Ubuntu 12.04 repositories - in this case, you can use PPA Purge to purge the Unity Staging PPA and all the packages upgraded from this PPA should return to the version available in the official Ubuntu 12.04 repositories.

To be able to purge a PPA, you need to install "ppa-purge":
sudo apt-get install ppa-purge

To purge a PPA, you must use the following command:
sudo ppa-purge ppa:someppa/ppa

For example, to purge the Unity Staging PPA, you would use:
sudo ppa-purge ppa:unity-team/staging

If the 'ppa-purge' command fails for some reason, you can't run 'ppa-purge' again unless you re-enable the PPA - see how to re-enable it above (under "How to disable a PPA").

Purging a PPA can be a bit tricky sometimes, because if a package installed from a PPA doesn't exist in the official Ubuntu repositories, it can't be downgraded and PPA Purge won't remove it either, so you'll have to remove it manually. But the PPA Purge purpose is to restore the original packages from the Ubuntu repositories in case something goes wrong when upgrading some packages from a PPA, and for this purpose, PPA Purge usually works great.


Also see: Y PPA Manager, a tool you can use to easily add, remove, purge, search for PPAs and more.

0 comments

» read more....

Y PPA Manager 0.0.8.4 Released, Finally Works In KDE Too

9:21 PM

Y PPA Manager

Today I've released Y PPA Manager 0.0.8.4. For those not familiar with Y PPA Manager: this is a GUI tool for easily managing and searching for PPAs. It can add/remove/purge PPAs, search all Launchpad PPAs for certain packages, backup and restore PPAs, remove duplicate PPA sources, comes with Unity quicklists and more.

Y PPA Manager indicator


Changes in Y PPA Manager 0.0.8.4:
  • added Ubuntu appindicator: works in stand alone mode (automatically starts when you log in and doesn't require Y PPA Manager to run) or in regular mode: starts when the user opens Y PPA Manager and quits when Y PPA Manager is closed. The appindicator is disabled by default and can be enabled from the settings.
  • Ubuntu mono dark/light icons for the new appindicator (not the best icons, I know...)
  • use built-in (doesn't require Faenza to be installed) slightly modified Faenza icons for the main UI (this is mainly to look better in KDE because some icons used before were missing in KDE)
  • added "import all missing GPG keys" feature (available under Advanced)
  • added "fix all GPG badsig errors" feature (available under Advanced)
  • kdesudo integration
  • renamed NotifyOSD icons to work with KDE too
  • Linux Mint 12 Lisa support (not tested since Linux Mint 12 hasn't been released yet)


Starting with this version, Y PPA Manager should fully work under KDE (though there are some minor bugs like notifications not being displayed when adding a PPA). But of course, since Y PPA Manager uses YAD (a GTK alternative to Zenity), it doesn't look exactly right under KDE, however there are only a few GTK dependencies so installing it in KDE doesn't install the whole GNOME desktop.

There are also various changes under the hood and bug fixes. Because there are so many changes in this release, you might find bugs. Please report them @ Launchpad.

To install the latest Y PPA Manager in Ubuntu, use the commands below:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

0 comments

» read more....

Re-Enable Working PPAs After Ubuntu Upgrade With Y PPA Manager 0.0.8.2

7:22 PM

Y PPA Manager

Today I'm releasing Y PPA Manager 0.0.8.2. The new version comes with only one new feature: re-enable working PPAs after an Ubuntu upgrade. This feature was implemented by WebUpd8 reader Christian Dannie Storgaard (many thanks!).

All PPAs are automatically disabled when you upgrade to a new Ubuntu version. This new option checks if the old PPAs work with the new Ubuntu version and if they do work, it re-enables them.

Example: you've just upgraded from Ubuntu Natty to Oneiric and all your PPAs were disabled. Install Y PPA Manager and go to Advanced > Re-enable working PPAs after Ubuntu upgrade. After a few seconds, all the PPAs that you had on Natty and still work in Oneiric will be re-enabled.

The PPAs that haven't been updated for the new Ubuntu version will remain disabled. Also, this feature will not re-enable all the PPAs - just those that were disabled after an Ubuntu upgrade!

Before using this feature, please note that it's sort of experimental (I didn't encounter any issues in my test, but it's better to be safe!), so please back up the PPAs (either manually or using the PPAs backup feature in Y PPA Manager) just in case!

For those not familiar with Y PPA Manager: this is a GUI tool for easily managing and searching for PPAs. It can add/remove/purge PPAs, search all Launchpad PPAs for certain packages, backup and restore PPAs, remove duplicate PPA sources, comes with Unity quicklists and more.


Install Y PPA Manager in Ubuntu 10.04, 10.10, 11.04 or 11.10 using the commands below:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

For bug reports, see Y PPA Manager @ Launchpad.

0 comments

» read more....

Y PPA Manager 0.0.8.1 Released With Ubuntu 11.10 Support

4:42 PM

Y PPA Manager

Y PPA Manager 0.0.8.1 has been released today, bringing support for Ubuntu 11.10 Oneiric Ocelot and quite a few bug fixes.

I've also tried adding a PPA ranking system based on the number of downloads for each PPA, but it was very slow and since it depends on Launchpad and not me, I've disabled it for now. I'll enable this feature as soon as this is fixed.

Y PPA Manager features:
  • search packages in all Launchpad PPAs

  • list and download packages in a PPA

  • add / remove / purge a PPA

  • backup and restore PPA sources

  • remove duplicate PPA sources

  • works in Linux Mint too

  • Unity quicklists


For more info, see the Y PPA Manager Launchpad page.

To install the latest Y PPA Manager in Ubuntu (9.10, 10.04, 10.10, 11.04 or 11.10), use the commands below:
sudo add-apt-repository ppa:webupd8team/y-ppa-manager

sudo apt-get update

sudo apt-get install y-ppa-manager

0 comments

» read more....

Install Zukitwo GTK2/3 Theme With A Fixed Unity Panel Background [PPA]

8:10 PM

Speaking of Zukitwo, as you probably know, the GTK2/3 theme is available in the WebUpd8 Themes PPA for quite some time (and is constantly updated).

Well, because the theme was especially designed to be used with a custom panel background (which you have to edit in GIMP) and because you can't use a custom panel background in Unity, I've enabled a tweak for Ubuntu 11.04 and 11.10 which makes the theme use a regular panel background by default (dark) so you don't have to tweak anything by yourself.

You still have to manually enable this tweak for Ubuntu 10.04 or 10.10 if you don't want to create the panel background as explained on the Zukitwo INSTALL file (you must download it from DeviantArt to access this file), using the command below:

-For Zukitwo:
sudo sed -i 's/#bg_pixmap\[NORMAL\]/bg_pixmap\[NORMAL\]/' /usr/share/themes/Zukitwo/gtk-2.0/widgets/panel.rc

-For Zukitwo Dark
sudo sed -i 's/#bg_pixmap\[NORMAL\]/bg_pixmap\[NORMAL\]/' /usr/share/themes/Zukitwo-Dark/gtk-2.0/widgets/panel.rc

-For Zukitwo Resonance:
sudo sed -i 's/#bg_pixmap\[NORMAL\]/bg_pixmap\[NORMAL\]/' /usr/share/themes/Zukitwo-Resonance/gtk-2.0/widgets/panel.rc

The commands above can also be used by those who've manually installed Zukitwo (but make sure the theme is installed under /usr/share/themes/).


Here are a couple of Zukitwo screenshots:

- GTK2 theme (Ubuntu 11.04):

Zukitwo GTK2 theme

- GTK3 theme (Ubuntu 11.10):

Zukitwo GTK3 theme


Install Zukitwo from the WebUpd8 Themes PPA


To install Zukitwo in Ubuntu via the WebUpd8 Themes PPA, use the commands below:


sudo add-apt-repository ppa:webupd8team/themes

sudo apt-get update

sudo apt-get install zukitwo-theme-all

Note: Nautilus Elementary is required for the GTK2 theme to look properly.


If you're not using Ubuntu or want to install the GNOME Shell theme (not available in the PPA), download Zukitwo from DeviantArt.

0 comments

» read more....

Get Rid Of PPA "404 Not Found" Messages When Running "apt-get update"

6:22 PM

PPA 404 errors

If you type the wrong PPA address when adding a PPA or you add a PPA that doesn't provide packages for your Ubuntu version, you'll get a "404 Not Found" error message when running "apt-get update".

These errors are pretty much harmless (though they probably slow down "apt-get update" a bit) but if you want to get rid of them anyway, you must disable the PPAs that cause the 404 errors via Software Sources. If you want an easier, automated way to disable the PPAs that cause these errors, give "fix404" a try.

"fix404" is a simple script that checks for "404 not found" messages for all the PPAs added to your software sources and prompts you to disable them:

Fix404 PPA errors

"fix404" will prompt twice for each PPA - that's because it needs to disable both the binary and the source line.


By the way, if you want to check which Ubuntu versions are supported by each PPA you've added, use "checklp".


Installation


The "fix404" PPA is only available for Ubuntu 11.04 Natty Narwhal - add it and install it using the commands below:
sudo apt-add-repository ppa:lkjoel/fix404
sudo apt-get update
sudo apt-get install fix404

For other Ubuntu versions, you can download the .deb file from HERE.

To use "fix404", run the following command in a terminal:
sudo fix404

Update: the last command is required because I've found a bug in this script (the permission of the modified .list files is changed). I've reported the bug so hopefully it will be fixed. The bug has been fixed. In case you've ran fix404 before the fix and get an Update Manager error, run this command in a terminal: "sudo chmod 644 /etc/apt/sources.list.d/*".


Also see: Launchpad-Getkeys, a tool to automatically import all missing PPA GPG keys.


Thanks to lkubuntu for the script!

0 comments

» read more....