How can I get rid of duplicate icons in /usr/share/applications?

Multi tool use
Clash Royale CLAN TAG#URR8PPP
As the folder name says /usr/share/applications
... are these all my applications installed in the system?
Will deleting a program's icon in below pics mean uninstalling it from the system permanently?
For example, I see Amazon & Cheese icons twice... Files icon thrice
This is a freshly installed Ubuntu 18.04 and I've just installed Audacious, MPV player, Dconf & GNOME Tweaks.
My intention:
- How can I know which icon is the actual application that I have to keep? For example I want to remove Amazon completely from my system. Of the two Archive Manager icons, I want to keep the actual working one and remove the other...
How can I know the name of application that can be removed via command line, for example
sudo apt remove Amazon
sudo apt remove Audacious Qt Interface
sudo apt remove Cheese-not-in-use
sudo apt remove Files1-not-in-use
sudo apt remove Files2-not-in-use
Final Goal:
If I want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only, then I want to see only 12 icons in this folder.
Is this achievable?
gnome startup-applications
add a comment |
As the folder name says /usr/share/applications
... are these all my applications installed in the system?
Will deleting a program's icon in below pics mean uninstalling it from the system permanently?
For example, I see Amazon & Cheese icons twice... Files icon thrice
This is a freshly installed Ubuntu 18.04 and I've just installed Audacious, MPV player, Dconf & GNOME Tweaks.
My intention:
- How can I know which icon is the actual application that I have to keep? For example I want to remove Amazon completely from my system. Of the two Archive Manager icons, I want to keep the actual working one and remove the other...
How can I know the name of application that can be removed via command line, for example
sudo apt remove Amazon
sudo apt remove Audacious Qt Interface
sudo apt remove Cheese-not-in-use
sudo apt remove Files1-not-in-use
sudo apt remove Files2-not-in-use
Final Goal:
If I want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only, then I want to see only 12 icons in this folder.
Is this achievable?
gnome startup-applications
add a comment |
As the folder name says /usr/share/applications
... are these all my applications installed in the system?
Will deleting a program's icon in below pics mean uninstalling it from the system permanently?
For example, I see Amazon & Cheese icons twice... Files icon thrice
This is a freshly installed Ubuntu 18.04 and I've just installed Audacious, MPV player, Dconf & GNOME Tweaks.
My intention:
- How can I know which icon is the actual application that I have to keep? For example I want to remove Amazon completely from my system. Of the two Archive Manager icons, I want to keep the actual working one and remove the other...
How can I know the name of application that can be removed via command line, for example
sudo apt remove Amazon
sudo apt remove Audacious Qt Interface
sudo apt remove Cheese-not-in-use
sudo apt remove Files1-not-in-use
sudo apt remove Files2-not-in-use
Final Goal:
If I want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only, then I want to see only 12 icons in this folder.
Is this achievable?
gnome startup-applications
As the folder name says /usr/share/applications
... are these all my applications installed in the system?
Will deleting a program's icon in below pics mean uninstalling it from the system permanently?
For example, I see Amazon & Cheese icons twice... Files icon thrice
This is a freshly installed Ubuntu 18.04 and I've just installed Audacious, MPV player, Dconf & GNOME Tweaks.
My intention:
- How can I know which icon is the actual application that I have to keep? For example I want to remove Amazon completely from my system. Of the two Archive Manager icons, I want to keep the actual working one and remove the other...
How can I know the name of application that can be removed via command line, for example
sudo apt remove Amazon
sudo apt remove Audacious Qt Interface
sudo apt remove Cheese-not-in-use
sudo apt remove Files1-not-in-use
sudo apt remove Files2-not-in-use
Final Goal:
If I want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only, then I want to see only 12 icons in this folder.
Is this achievable?
gnome startup-applications
gnome startup-applications
edited Dec 23 '18 at 10:05


Zanna
50.2k13133241
50.2k13133241
asked Dec 23 '18 at 9:28


PRATAP
2,2632525
2,2632525
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Desktop Entries are either created by the applications or by the user as per his convenience. Not all Desktop Entries refer to application. Remember it might happen a user has created a script and to run that he used a Desktop Entry. So not all desktop entry refer to application. It is also to be noted that not all Desktop Entries are in /usr/share/applications
.
are these all my applications installed in the system?
Most probably yes if all these are created by system/application itself. Desktop entries are created at the time of installation of a software (if software knows how to create that like Google Chrome does but Netbeans doesn't).
deleting icon in below pics, means uninstalling it from the system permanently?
Not really. You are just deleting a way (shortcut) to launch a specific application not an application which will still exist after the
.desktop
file is deleted.
how to know which icon is the actual application that i have to keep
You need to open duplicate desktop entries through a text editor and determine which functionality it offers or for what purpose it is there. Multiple desktop entries must have created multiple shortcuts in app drawer but out of those multiple desktop entries only 1 is visible and every other will be hidden due to
NoDisplay=true
in their description. That's why only 1 is visible in app drawer. It may also contain a lineOnlyShownIn
orNotShowIn
to show or hide in specific DE.You can learn more about it at Desktop Entry Specification
how to know the name of application that can be remove via command line
For this refer N0rbert's answer
if i want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only then i want to see only 12 icons in this folder.
No. Some entries like that of Bluetooth are defined by the system and it needs that to properly display it while using a search.
3
Nice, I'd like to mention that multiple entries are used for different purposes, e.g.Files
has different.desktop
- files, one is used in the dashboard, another one will be used in the taskbar, so none of them should be deleted.
– mook765
Dec 23 '18 at 10:17
@mook765 Yeah that's what I meant by determine which functionality it offers in point 3.
– Kulfy
Dec 23 '18 at 10:20
@Kulfy good answer, but I disagree with the first point. Those are only the applications that offer a GUI. Most CLI only applications don't come with a desktop entry.
– danzel
Dec 23 '18 at 10:54
@danzel I agree. IMO GUI is also offered by an executable file to make app interactive. But if the desktop entry is created by user it might be used to just execute a script. One of my friend created the desktop entry to execute a script because he was facing some sort of problems and that script has to be executed once in a while.
– Kulfy
Dec 23 '18 at 11:00
@danzel Most CLI only applications don't come with a desktop entry: Python also have a Desktop Entry by default. For reference you can look into the screenshot in question body. :)
– Kulfy
Dec 23 '18 at 11:04
|
show 2 more comments
If you went here with MacOS habits, do not expect that pressing Shift+ Delete will remove things.
In Ubuntu this folder contains many *.desktop files for installed applications.
If they were installed by APT then you can use the power of dpkg
to manage them.
So you can find Amazon with:
ls -1 /usr/share/applications/ | grep -i amazon
it will return
com.canonical.launcher.amazon.desktop
ubuntu-amazon-default.desktop
Afterwards you can find their packages with dpkg -S
:
dpkg -S com.canonical.launcher.amazon.desktop ubuntu-amazon-default.desktop
ubuntu-web-launchers: /usr/share/applications/com.canonical.launcher.amazon.desktop
ubuntu-web-launchers: /usr/share/applications/ubuntu-amazon-default.desktop
and finally you can remove the related package:
sudo apt purge ubuntu-web-launchers
Programmatical way is below (warning: be careful with its execution - check the list of packages being removed before proceeding):
export ICONNAME=Amazon
sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i $ICONNAME) | awk 'print $1' | sed 's/://' | sort -u)
I see that Kulfy's answer contains needed information. But my answer contains practical method. So both answers complete each other (thanks @Kulfy).
– N0rbert
Dec 23 '18 at 10:00
1
@N0rbert That's why I've referred your answer to complete my answer :)
– Kulfy
Dec 23 '18 at 10:02
@PRATAP it may lead to unpredictable behavior because of package dependencies. You should try this idea on clean VM with snapshots. I can't offer any warranty that system wont became broken completely.
– N0rbert
Dec 23 '18 at 10:31
@N0rbert i am trying to use the command you mentioned under programmatical way.. as i am new.. i am confused with those two commands.. do i need to run those commands one by one or it needs to keep in script? i tried second command by replacing$ICONNAME
withSudoku
– PRATAP
Dec 23 '18 at 13:52
pratap@PRATAP:~$ sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i Sudoku) | awk 'print $1' | sed 's/://' | sort -u) dpkg-query: no path found matching pattern *Sudoku.desktop* [sudo] password for pratap: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pratap@PRATAP:~$
– PRATAP
Dec 23 '18 at 13:53
|
show 3 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1103965%2fhow-can-i-get-rid-of-duplicate-icons-in-usr-share-applications%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Desktop Entries are either created by the applications or by the user as per his convenience. Not all Desktop Entries refer to application. Remember it might happen a user has created a script and to run that he used a Desktop Entry. So not all desktop entry refer to application. It is also to be noted that not all Desktop Entries are in /usr/share/applications
.
are these all my applications installed in the system?
Most probably yes if all these are created by system/application itself. Desktop entries are created at the time of installation of a software (if software knows how to create that like Google Chrome does but Netbeans doesn't).
deleting icon in below pics, means uninstalling it from the system permanently?
Not really. You are just deleting a way (shortcut) to launch a specific application not an application which will still exist after the
.desktop
file is deleted.
how to know which icon is the actual application that i have to keep
You need to open duplicate desktop entries through a text editor and determine which functionality it offers or for what purpose it is there. Multiple desktop entries must have created multiple shortcuts in app drawer but out of those multiple desktop entries only 1 is visible and every other will be hidden due to
NoDisplay=true
in their description. That's why only 1 is visible in app drawer. It may also contain a lineOnlyShownIn
orNotShowIn
to show or hide in specific DE.You can learn more about it at Desktop Entry Specification
how to know the name of application that can be remove via command line
For this refer N0rbert's answer
if i want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only then i want to see only 12 icons in this folder.
No. Some entries like that of Bluetooth are defined by the system and it needs that to properly display it while using a search.
3
Nice, I'd like to mention that multiple entries are used for different purposes, e.g.Files
has different.desktop
- files, one is used in the dashboard, another one will be used in the taskbar, so none of them should be deleted.
– mook765
Dec 23 '18 at 10:17
@mook765 Yeah that's what I meant by determine which functionality it offers in point 3.
– Kulfy
Dec 23 '18 at 10:20
@Kulfy good answer, but I disagree with the first point. Those are only the applications that offer a GUI. Most CLI only applications don't come with a desktop entry.
– danzel
Dec 23 '18 at 10:54
@danzel I agree. IMO GUI is also offered by an executable file to make app interactive. But if the desktop entry is created by user it might be used to just execute a script. One of my friend created the desktop entry to execute a script because he was facing some sort of problems and that script has to be executed once in a while.
– Kulfy
Dec 23 '18 at 11:00
@danzel Most CLI only applications don't come with a desktop entry: Python also have a Desktop Entry by default. For reference you can look into the screenshot in question body. :)
– Kulfy
Dec 23 '18 at 11:04
|
show 2 more comments
Desktop Entries are either created by the applications or by the user as per his convenience. Not all Desktop Entries refer to application. Remember it might happen a user has created a script and to run that he used a Desktop Entry. So not all desktop entry refer to application. It is also to be noted that not all Desktop Entries are in /usr/share/applications
.
are these all my applications installed in the system?
Most probably yes if all these are created by system/application itself. Desktop entries are created at the time of installation of a software (if software knows how to create that like Google Chrome does but Netbeans doesn't).
deleting icon in below pics, means uninstalling it from the system permanently?
Not really. You are just deleting a way (shortcut) to launch a specific application not an application which will still exist after the
.desktop
file is deleted.
how to know which icon is the actual application that i have to keep
You need to open duplicate desktop entries through a text editor and determine which functionality it offers or for what purpose it is there. Multiple desktop entries must have created multiple shortcuts in app drawer but out of those multiple desktop entries only 1 is visible and every other will be hidden due to
NoDisplay=true
in their description. That's why only 1 is visible in app drawer. It may also contain a lineOnlyShownIn
orNotShowIn
to show or hide in specific DE.You can learn more about it at Desktop Entry Specification
how to know the name of application that can be remove via command line
For this refer N0rbert's answer
if i want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only then i want to see only 12 icons in this folder.
No. Some entries like that of Bluetooth are defined by the system and it needs that to properly display it while using a search.
3
Nice, I'd like to mention that multiple entries are used for different purposes, e.g.Files
has different.desktop
- files, one is used in the dashboard, another one will be used in the taskbar, so none of them should be deleted.
– mook765
Dec 23 '18 at 10:17
@mook765 Yeah that's what I meant by determine which functionality it offers in point 3.
– Kulfy
Dec 23 '18 at 10:20
@Kulfy good answer, but I disagree with the first point. Those are only the applications that offer a GUI. Most CLI only applications don't come with a desktop entry.
– danzel
Dec 23 '18 at 10:54
@danzel I agree. IMO GUI is also offered by an executable file to make app interactive. But if the desktop entry is created by user it might be used to just execute a script. One of my friend created the desktop entry to execute a script because he was facing some sort of problems and that script has to be executed once in a while.
– Kulfy
Dec 23 '18 at 11:00
@danzel Most CLI only applications don't come with a desktop entry: Python also have a Desktop Entry by default. For reference you can look into the screenshot in question body. :)
– Kulfy
Dec 23 '18 at 11:04
|
show 2 more comments
Desktop Entries are either created by the applications or by the user as per his convenience. Not all Desktop Entries refer to application. Remember it might happen a user has created a script and to run that he used a Desktop Entry. So not all desktop entry refer to application. It is also to be noted that not all Desktop Entries are in /usr/share/applications
.
are these all my applications installed in the system?
Most probably yes if all these are created by system/application itself. Desktop entries are created at the time of installation of a software (if software knows how to create that like Google Chrome does but Netbeans doesn't).
deleting icon in below pics, means uninstalling it from the system permanently?
Not really. You are just deleting a way (shortcut) to launch a specific application not an application which will still exist after the
.desktop
file is deleted.
how to know which icon is the actual application that i have to keep
You need to open duplicate desktop entries through a text editor and determine which functionality it offers or for what purpose it is there. Multiple desktop entries must have created multiple shortcuts in app drawer but out of those multiple desktop entries only 1 is visible and every other will be hidden due to
NoDisplay=true
in their description. That's why only 1 is visible in app drawer. It may also contain a lineOnlyShownIn
orNotShowIn
to show or hide in specific DE.You can learn more about it at Desktop Entry Specification
how to know the name of application that can be remove via command line
For this refer N0rbert's answer
if i want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only then i want to see only 12 icons in this folder.
No. Some entries like that of Bluetooth are defined by the system and it needs that to properly display it while using a search.
Desktop Entries are either created by the applications or by the user as per his convenience. Not all Desktop Entries refer to application. Remember it might happen a user has created a script and to run that he used a Desktop Entry. So not all desktop entry refer to application. It is also to be noted that not all Desktop Entries are in /usr/share/applications
.
are these all my applications installed in the system?
Most probably yes if all these are created by system/application itself. Desktop entries are created at the time of installation of a software (if software knows how to create that like Google Chrome does but Netbeans doesn't).
deleting icon in below pics, means uninstalling it from the system permanently?
Not really. You are just deleting a way (shortcut) to launch a specific application not an application which will still exist after the
.desktop
file is deleted.
how to know which icon is the actual application that i have to keep
You need to open duplicate desktop entries through a text editor and determine which functionality it offers or for what purpose it is there. Multiple desktop entries must have created multiple shortcuts in app drawer but out of those multiple desktop entries only 1 is visible and every other will be hidden due to
NoDisplay=true
in their description. That's why only 1 is visible in app drawer. It may also contain a lineOnlyShownIn
orNotShowIn
to show or hide in specific DE.You can learn more about it at Desktop Entry Specification
how to know the name of application that can be remove via command line
For this refer N0rbert's answer
if i want Audacious, MPV player, Dconf, Files, Cheese, InputMethod, Keyboard, Gparted, Displays, Dock, Disks, Calendar only then i want to see only 12 icons in this folder.
No. Some entries like that of Bluetooth are defined by the system and it needs that to properly display it while using a search.
edited Dec 23 '18 at 10:25
answered Dec 23 '18 at 9:56


Kulfy
3,49341139
3,49341139
3
Nice, I'd like to mention that multiple entries are used for different purposes, e.g.Files
has different.desktop
- files, one is used in the dashboard, another one will be used in the taskbar, so none of them should be deleted.
– mook765
Dec 23 '18 at 10:17
@mook765 Yeah that's what I meant by determine which functionality it offers in point 3.
– Kulfy
Dec 23 '18 at 10:20
@Kulfy good answer, but I disagree with the first point. Those are only the applications that offer a GUI. Most CLI only applications don't come with a desktop entry.
– danzel
Dec 23 '18 at 10:54
@danzel I agree. IMO GUI is also offered by an executable file to make app interactive. But if the desktop entry is created by user it might be used to just execute a script. One of my friend created the desktop entry to execute a script because he was facing some sort of problems and that script has to be executed once in a while.
– Kulfy
Dec 23 '18 at 11:00
@danzel Most CLI only applications don't come with a desktop entry: Python also have a Desktop Entry by default. For reference you can look into the screenshot in question body. :)
– Kulfy
Dec 23 '18 at 11:04
|
show 2 more comments
3
Nice, I'd like to mention that multiple entries are used for different purposes, e.g.Files
has different.desktop
- files, one is used in the dashboard, another one will be used in the taskbar, so none of them should be deleted.
– mook765
Dec 23 '18 at 10:17
@mook765 Yeah that's what I meant by determine which functionality it offers in point 3.
– Kulfy
Dec 23 '18 at 10:20
@Kulfy good answer, but I disagree with the first point. Those are only the applications that offer a GUI. Most CLI only applications don't come with a desktop entry.
– danzel
Dec 23 '18 at 10:54
@danzel I agree. IMO GUI is also offered by an executable file to make app interactive. But if the desktop entry is created by user it might be used to just execute a script. One of my friend created the desktop entry to execute a script because he was facing some sort of problems and that script has to be executed once in a while.
– Kulfy
Dec 23 '18 at 11:00
@danzel Most CLI only applications don't come with a desktop entry: Python also have a Desktop Entry by default. For reference you can look into the screenshot in question body. :)
– Kulfy
Dec 23 '18 at 11:04
3
3
Nice, I'd like to mention that multiple entries are used for different purposes, e.g.
Files
has different .desktop
- files, one is used in the dashboard, another one will be used in the taskbar, so none of them should be deleted.– mook765
Dec 23 '18 at 10:17
Nice, I'd like to mention that multiple entries are used for different purposes, e.g.
Files
has different .desktop
- files, one is used in the dashboard, another one will be used in the taskbar, so none of them should be deleted.– mook765
Dec 23 '18 at 10:17
@mook765 Yeah that's what I meant by determine which functionality it offers in point 3.
– Kulfy
Dec 23 '18 at 10:20
@mook765 Yeah that's what I meant by determine which functionality it offers in point 3.
– Kulfy
Dec 23 '18 at 10:20
@Kulfy good answer, but I disagree with the first point. Those are only the applications that offer a GUI. Most CLI only applications don't come with a desktop entry.
– danzel
Dec 23 '18 at 10:54
@Kulfy good answer, but I disagree with the first point. Those are only the applications that offer a GUI. Most CLI only applications don't come with a desktop entry.
– danzel
Dec 23 '18 at 10:54
@danzel I agree. IMO GUI is also offered by an executable file to make app interactive. But if the desktop entry is created by user it might be used to just execute a script. One of my friend created the desktop entry to execute a script because he was facing some sort of problems and that script has to be executed once in a while.
– Kulfy
Dec 23 '18 at 11:00
@danzel I agree. IMO GUI is also offered by an executable file to make app interactive. But if the desktop entry is created by user it might be used to just execute a script. One of my friend created the desktop entry to execute a script because he was facing some sort of problems and that script has to be executed once in a while.
– Kulfy
Dec 23 '18 at 11:00
@danzel Most CLI only applications don't come with a desktop entry: Python also have a Desktop Entry by default. For reference you can look into the screenshot in question body. :)
– Kulfy
Dec 23 '18 at 11:04
@danzel Most CLI only applications don't come with a desktop entry: Python also have a Desktop Entry by default. For reference you can look into the screenshot in question body. :)
– Kulfy
Dec 23 '18 at 11:04
|
show 2 more comments
If you went here with MacOS habits, do not expect that pressing Shift+ Delete will remove things.
In Ubuntu this folder contains many *.desktop files for installed applications.
If they were installed by APT then you can use the power of dpkg
to manage them.
So you can find Amazon with:
ls -1 /usr/share/applications/ | grep -i amazon
it will return
com.canonical.launcher.amazon.desktop
ubuntu-amazon-default.desktop
Afterwards you can find their packages with dpkg -S
:
dpkg -S com.canonical.launcher.amazon.desktop ubuntu-amazon-default.desktop
ubuntu-web-launchers: /usr/share/applications/com.canonical.launcher.amazon.desktop
ubuntu-web-launchers: /usr/share/applications/ubuntu-amazon-default.desktop
and finally you can remove the related package:
sudo apt purge ubuntu-web-launchers
Programmatical way is below (warning: be careful with its execution - check the list of packages being removed before proceeding):
export ICONNAME=Amazon
sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i $ICONNAME) | awk 'print $1' | sed 's/://' | sort -u)
I see that Kulfy's answer contains needed information. But my answer contains practical method. So both answers complete each other (thanks @Kulfy).
– N0rbert
Dec 23 '18 at 10:00
1
@N0rbert That's why I've referred your answer to complete my answer :)
– Kulfy
Dec 23 '18 at 10:02
@PRATAP it may lead to unpredictable behavior because of package dependencies. You should try this idea on clean VM with snapshots. I can't offer any warranty that system wont became broken completely.
– N0rbert
Dec 23 '18 at 10:31
@N0rbert i am trying to use the command you mentioned under programmatical way.. as i am new.. i am confused with those two commands.. do i need to run those commands one by one or it needs to keep in script? i tried second command by replacing$ICONNAME
withSudoku
– PRATAP
Dec 23 '18 at 13:52
pratap@PRATAP:~$ sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i Sudoku) | awk 'print $1' | sed 's/://' | sort -u) dpkg-query: no path found matching pattern *Sudoku.desktop* [sudo] password for pratap: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pratap@PRATAP:~$
– PRATAP
Dec 23 '18 at 13:53
|
show 3 more comments
If you went here with MacOS habits, do not expect that pressing Shift+ Delete will remove things.
In Ubuntu this folder contains many *.desktop files for installed applications.
If they were installed by APT then you can use the power of dpkg
to manage them.
So you can find Amazon with:
ls -1 /usr/share/applications/ | grep -i amazon
it will return
com.canonical.launcher.amazon.desktop
ubuntu-amazon-default.desktop
Afterwards you can find their packages with dpkg -S
:
dpkg -S com.canonical.launcher.amazon.desktop ubuntu-amazon-default.desktop
ubuntu-web-launchers: /usr/share/applications/com.canonical.launcher.amazon.desktop
ubuntu-web-launchers: /usr/share/applications/ubuntu-amazon-default.desktop
and finally you can remove the related package:
sudo apt purge ubuntu-web-launchers
Programmatical way is below (warning: be careful with its execution - check the list of packages being removed before proceeding):
export ICONNAME=Amazon
sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i $ICONNAME) | awk 'print $1' | sed 's/://' | sort -u)
I see that Kulfy's answer contains needed information. But my answer contains practical method. So both answers complete each other (thanks @Kulfy).
– N0rbert
Dec 23 '18 at 10:00
1
@N0rbert That's why I've referred your answer to complete my answer :)
– Kulfy
Dec 23 '18 at 10:02
@PRATAP it may lead to unpredictable behavior because of package dependencies. You should try this idea on clean VM with snapshots. I can't offer any warranty that system wont became broken completely.
– N0rbert
Dec 23 '18 at 10:31
@N0rbert i am trying to use the command you mentioned under programmatical way.. as i am new.. i am confused with those two commands.. do i need to run those commands one by one or it needs to keep in script? i tried second command by replacing$ICONNAME
withSudoku
– PRATAP
Dec 23 '18 at 13:52
pratap@PRATAP:~$ sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i Sudoku) | awk 'print $1' | sed 's/://' | sort -u) dpkg-query: no path found matching pattern *Sudoku.desktop* [sudo] password for pratap: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pratap@PRATAP:~$
– PRATAP
Dec 23 '18 at 13:53
|
show 3 more comments
If you went here with MacOS habits, do not expect that pressing Shift+ Delete will remove things.
In Ubuntu this folder contains many *.desktop files for installed applications.
If they were installed by APT then you can use the power of dpkg
to manage them.
So you can find Amazon with:
ls -1 /usr/share/applications/ | grep -i amazon
it will return
com.canonical.launcher.amazon.desktop
ubuntu-amazon-default.desktop
Afterwards you can find their packages with dpkg -S
:
dpkg -S com.canonical.launcher.amazon.desktop ubuntu-amazon-default.desktop
ubuntu-web-launchers: /usr/share/applications/com.canonical.launcher.amazon.desktop
ubuntu-web-launchers: /usr/share/applications/ubuntu-amazon-default.desktop
and finally you can remove the related package:
sudo apt purge ubuntu-web-launchers
Programmatical way is below (warning: be careful with its execution - check the list of packages being removed before proceeding):
export ICONNAME=Amazon
sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i $ICONNAME) | awk 'print $1' | sed 's/://' | sort -u)
If you went here with MacOS habits, do not expect that pressing Shift+ Delete will remove things.
In Ubuntu this folder contains many *.desktop files for installed applications.
If they were installed by APT then you can use the power of dpkg
to manage them.
So you can find Amazon with:
ls -1 /usr/share/applications/ | grep -i amazon
it will return
com.canonical.launcher.amazon.desktop
ubuntu-amazon-default.desktop
Afterwards you can find their packages with dpkg -S
:
dpkg -S com.canonical.launcher.amazon.desktop ubuntu-amazon-default.desktop
ubuntu-web-launchers: /usr/share/applications/com.canonical.launcher.amazon.desktop
ubuntu-web-launchers: /usr/share/applications/ubuntu-amazon-default.desktop
and finally you can remove the related package:
sudo apt purge ubuntu-web-launchers
Programmatical way is below (warning: be careful with its execution - check the list of packages being removed before proceeding):
export ICONNAME=Amazon
sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i $ICONNAME) | awk 'print $1' | sed 's/://' | sort -u)
edited Dec 23 '18 at 10:23
answered Dec 23 '18 at 9:49
N0rbert
21.4k547100
21.4k547100
I see that Kulfy's answer contains needed information. But my answer contains practical method. So both answers complete each other (thanks @Kulfy).
– N0rbert
Dec 23 '18 at 10:00
1
@N0rbert That's why I've referred your answer to complete my answer :)
– Kulfy
Dec 23 '18 at 10:02
@PRATAP it may lead to unpredictable behavior because of package dependencies. You should try this idea on clean VM with snapshots. I can't offer any warranty that system wont became broken completely.
– N0rbert
Dec 23 '18 at 10:31
@N0rbert i am trying to use the command you mentioned under programmatical way.. as i am new.. i am confused with those two commands.. do i need to run those commands one by one or it needs to keep in script? i tried second command by replacing$ICONNAME
withSudoku
– PRATAP
Dec 23 '18 at 13:52
pratap@PRATAP:~$ sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i Sudoku) | awk 'print $1' | sed 's/://' | sort -u) dpkg-query: no path found matching pattern *Sudoku.desktop* [sudo] password for pratap: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pratap@PRATAP:~$
– PRATAP
Dec 23 '18 at 13:53
|
show 3 more comments
I see that Kulfy's answer contains needed information. But my answer contains practical method. So both answers complete each other (thanks @Kulfy).
– N0rbert
Dec 23 '18 at 10:00
1
@N0rbert That's why I've referred your answer to complete my answer :)
– Kulfy
Dec 23 '18 at 10:02
@PRATAP it may lead to unpredictable behavior because of package dependencies. You should try this idea on clean VM with snapshots. I can't offer any warranty that system wont became broken completely.
– N0rbert
Dec 23 '18 at 10:31
@N0rbert i am trying to use the command you mentioned under programmatical way.. as i am new.. i am confused with those two commands.. do i need to run those commands one by one or it needs to keep in script? i tried second command by replacing$ICONNAME
withSudoku
– PRATAP
Dec 23 '18 at 13:52
pratap@PRATAP:~$ sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i Sudoku) | awk 'print $1' | sed 's/://' | sort -u) dpkg-query: no path found matching pattern *Sudoku.desktop* [sudo] password for pratap: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pratap@PRATAP:~$
– PRATAP
Dec 23 '18 at 13:53
I see that Kulfy's answer contains needed information. But my answer contains practical method. So both answers complete each other (thanks @Kulfy).
– N0rbert
Dec 23 '18 at 10:00
I see that Kulfy's answer contains needed information. But my answer contains practical method. So both answers complete each other (thanks @Kulfy).
– N0rbert
Dec 23 '18 at 10:00
1
1
@N0rbert That's why I've referred your answer to complete my answer :)
– Kulfy
Dec 23 '18 at 10:02
@N0rbert That's why I've referred your answer to complete my answer :)
– Kulfy
Dec 23 '18 at 10:02
@PRATAP it may lead to unpredictable behavior because of package dependencies. You should try this idea on clean VM with snapshots. I can't offer any warranty that system wont became broken completely.
– N0rbert
Dec 23 '18 at 10:31
@PRATAP it may lead to unpredictable behavior because of package dependencies. You should try this idea on clean VM with snapshots. I can't offer any warranty that system wont became broken completely.
– N0rbert
Dec 23 '18 at 10:31
@N0rbert i am trying to use the command you mentioned under programmatical way.. as i am new.. i am confused with those two commands.. do i need to run those commands one by one or it needs to keep in script? i tried second command by replacing
$ICONNAME
with Sudoku
– PRATAP
Dec 23 '18 at 13:52
@N0rbert i am trying to use the command you mentioned under programmatical way.. as i am new.. i am confused with those two commands.. do i need to run those commands one by one or it needs to keep in script? i tried second command by replacing
$ICONNAME
with Sudoku
– PRATAP
Dec 23 '18 at 13:52
pratap@PRATAP:~$ sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i Sudoku) | awk 'print $1' | sed 's/://' | sort -u) dpkg-query: no path found matching pattern *Sudoku.desktop* [sudo] password for pratap: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pratap@PRATAP:~$
– PRATAP
Dec 23 '18 at 13:53
pratap@PRATAP:~$ sudo apt-get purge $(dpkg -S $(ls -1 /usr/share/applications/ | grep -i Sudoku) | awk 'print $1' | sed 's/://' | sort -u) dpkg-query: no path found matching pattern *Sudoku.desktop* [sudo] password for pratap: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. pratap@PRATAP:~$
– PRATAP
Dec 23 '18 at 13:53
|
show 3 more comments
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1103965%2fhow-can-i-get-rid-of-duplicate-icons-in-usr-share-applications%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown