How can I remove Unity web apps?

I recently installed Ubuntu and all has been great, except for the web apps feature.

I've tried adding a few web apps, but it's very buggy and not a very good experience. I'm also tired of being asked to add a website as an web app. How can I remove web apps from Ubuntu entirely? I use both Chromium and Firefox.


Ubuntu 13.10 and 14.04

To avoid being asked for webapp integration you can use the following command, open a Terminal (Ctrl+Alt+t) and type:

gsettings set com.canonical.unity.webapps integration-allowed false

Tested on both releases with Firefox/Chromium + Launchpad, Facebook and Youtube. No popup asking for a webapp integration.

Removing existing webapps

We can't just remove all packages beginning with unity-webapps- as some of them are runtime dependencies of Unity or other packages (like the Ubuntu SDK which requires unity-webapps-qml)

A safe way is to remove such installed packages not belonging to the gnome section:

sudo apt-get remove $(dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package} ${Section}\n' unity-webapps-* | awk '{if ($1 == "ii" && $3 != "gnome") {print $2}}')

If what you want is removing them, you can do it in two ways.

Manual

With this method you should copy and paste the packages names.

apt-cache search unity-webapps

This will give you a list of all your webapps. Just remove the ones that you don't like with sudo apt-get remove packages.

Automatic

This will remove any package that its name starts with unity-webapps:

sudo aptitude remove '?and(?name(^unity-webapps), ?not(?or(?name(^unity-webapps-common), ?or(?name(^unity-webapps-qml), ?name(^unity-webapps-service$)))))'

This archive the same, just that more fancy:

sudo aptitude remove '?depends(unity-webapps-common)'

You should have installed aptitude by now with sudo apt-get install aptitude.

The wrong way

All webapps depends on the same package, unity-webapps-common, so if you remove it it should remove all those packages:

sudo apt-get remove unity-webapps-common

This will remove the ubuntu-desktop package and unity-asset-pool which may be undesirable.


Though the Command Line (quicker)

First open a Terminal (Ctrl+Alt+t) and these commands:

Remove all of the web apps


 sudo apt-get remove $(dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package} ${Section}\n' unity-webapps-* | awk '{if ($1 == "ii" && $3 != "gnome" && $2 != "unity-webapps-service" && $2 != "unity-webapps-common") {print $2}}')
 sudo apt-get remove xul-ext-unity unity-chromium-extension

Remove some of the web apps

apt-cache search unity-webapps

This will list all of your packages that began with unity-webapps Most of them will be webapps but not all (8). Do not remove the ones that it is not webapps this includes (libunity-webapps-dev, libunity-webapps-doc, libunity-webapps0, unity-webapps-common, unity-webapps-qml, unity-webapps-qml-doc unity-webapps-qml-examples, and the last one unity-webapps-service.) remove the ones that you what by sudo apt-get remove webapp1 webapp2... replace webappx with the name of the webapp that you want to get rad of. Note you can list them. DO NOT REMOVE unity-webapps-common, and unity-webapps-service IT WILL REMOVE UNITY!

Disable notifications from web apps (optional)

 gsettings set com.canonical.unity.webapps integration-allowed false
 gsettings set com.canonical.unity.webapps allowed-domains []

Do it Graphically

Remove some or all of the web apps

Open Synaptic Package Manager if you don't have it install fellow this instructions. After that search for unity-webapps- by hitting on the button that says "search"

enter image description here

You will get a window like this. Just type in unity-webapps- into the text box. Than hit the button that says "search" Just hit the button that says "Mark" and keep doing it if it is necessary.

enter image description here

After that Right click on any package that is green box next to it. The green box means it is installed. Select remove package to remove the webapp that you what to get rad of. If you want to get raid of all of them. Than research for xul-ext-unity, and unity-chromium-extension. DO NOT REMOVE unity-webapps-common, and unity-webapps-service IT WILL REMOVE UNITY!

enter image description here

After that, hit the button that says "Apply" And you will get a window like this, and just hit the button that says "Apply", too.

enter image description here

Disable notifications from web apps (optional)

First open to Dconf Editor, and if you don't have it install fellow this instructions, than go to com > cononical > unity > webapps. After that unchecked the check box integration-allowed

enter image description here

Clear every thing in the string allowed domains by double clicking on it and it should change it from a text field to a textbox.

enter image description here


Sources

  • http://www.ubuntuvibes.com/2012/10/how-to-remove-webapps-in-ubuntu-1210.html (For Disable notifications)

  • http://www.gaggl.com/2013/06/remove-ubuntu-webapps-integration-features/ (For removing the option in Firefox and Chromium.)

  • https://askubuntu.com/a/458004/48372 (For the command sudo apt-get remove $(dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package} ${Section}\n' unity-webapps-* | awk '{if ($1 == "ii" && $3 != "gnome" && $2 != "unity-webapps-service" && $2 != "unity-webapps-common") {print $2}}') I just modified it so it wounldn't remove "unity-webapps-service or unity-webapps-common Thanks to Sylvain Pineau for proving the original command)