How to Remove the Amazon Application From Ubuntu

Screenshot to remove Amazon from Ubuntu

If you have Ubuntu installed on your system, you may have noticed that halfway down the launcher there is an icon which, when clicked, takes you to Amazon's website.

There is nothing inherently wrong with the icon and it does no real harm and most of us have used the Amazon website at some point or another.

Amazon is, however, far more integrated into your Ubuntu desktop than you might think. In previous versions of Ubuntu, you would actually see links to Amazon products when you searched for applications within the Unity Dash.

As of Ubuntu 16.04, the majority of the Amazon stuff has been disabled. This guide shows the various methods used to remove Amazon from Ubuntu.

Removing Amazon from Ubuntu.

Option One: Uninstall Unity-Webapps-Common (Not Recommended)

Amazon has been installed into the Unity desktop as part of a package called Unity-Webapps-Common.

You could if you wanted to, open a terminal window and run the following command:

sudo apt-get remove unity-webapps-common

However, DO NOT DO THIS!

The unity-webapps-common is a metapackage containing lots of other packages. If you uninstall this application, then you will lose other things that you may need.

Instead, move on to Solution 2, which is definitely our preferred option.

Option Two: Remove The Files Manually (Highly Recommended)

In essence, the package appears to include 3 files which are related to Amazon:

/usr/share/applications/ubuntu-amazon-default.desktop
/usr/share/unity-webapps/userscripts/unity-webapps-amazon/Amazon.user.js
/usr/share/unity-webapps/userscripts/unity-webapps-amazon/manifest.json

The simplest option, therefore, is to remove these three files.

Open a terminal window and type in the following commands:

sudo rm /usr/share/applications/ubuntu-amazon-default.desktop
sudo rm /usr/share/unity-webapps/userscripts/unity-webapps-amazon/Amazon.user.js
sudo rm /usr/share/unity-webapps/userscripts/unity-webapps-amazon/manifest.json

That is it. Job done.

In theory, there could be stuff still lurking in the Unity code somewhere but from a user's perspective, Amazon is no longer installed as an entity.

How to Stop Amazon Coming Back

While researching for further information for this guide, somebody mentioned that when you upgrade Ubuntu in the future, the likelihood is that the Amazon icon will once again appear in the launcher.

The reason for this is that the unity-webapps-common package may be updated or reinstalled and, as the Amazon files are part of that package, they will be installed again.

We have seen one suggestion to divert the installation of the package so that it never appears:

sudo dpkg --divert /usr/share/applications/ubuntu-amazon-default.desktop.diverted --local --rename /usr/share/applications/ubuntu-amazon-default.desktop

This doesn't stop the file from being installed; it just renames it to have the extension diverted.

Personally, our recommendation is to add the original commands to a script and when you upgrade, run the script again or bookmark this page and copy and paste the commands from solution 2 straight into the terminal.

To create a script, open a terminal and run the following command:

nano removeamazon.sh

Enter the following commands into the script:

sudo rm /usr/share/applications/ubuntu-amazon-default.desktop
sudo rm /usr/share/unity-webapps/userscripts/unity-webapps-amazon/Amazon.user.js
sudo rm /usr/share/unity-webapps/userscripts/unity-webapps-amazon/manifest.json

Save the file by pressing CTRL + O and then exit the editor by pressing CTRL + X.

In order to run the script, you will need to change the permissions by running the following command:

chmod +x removeamazon.sh

Now, all you have to do when you upgrade Ubuntu is open a terminal and run the following command:

./removeamazon.sh

Disable the Amazon Dash Plugin

There is one more thing left to do and that is to disable the Amazon Dash Plugin.

To do this, press the Windows key + A. Alternatively, click on the icon at the top of the launcher and then click the Applications icon at the bottom of the screen.

You should see an icon for the Amazon Dash plugin. Right-click on the icon and click Disable. If you cannot see the Amazon Dash plugin, look at the line which reads Dash Plugins and click the see more results link.

Summary

Ideally, there would be a single command to remove the Amazon stuff or indeed it wouldn't be installed automatically in the first place. 

The above suggestions are the best on offer at this moment in time and they ultimately eliminate Amazon from Ubuntu.