Você não deve excluir os arquivos manualmente. Primeiro verifique os pacotes que contêm os arquivos. Para fazer isso de maneira limpa, instale apt-file
e teste com apt-file search
e dpkg -S
.
sudo apt-get install apt-file
apt-file update
Agora crie um arquivo simples com os nomes dos arquivos da área de trabalho,
no meu exemplo com o nome foo
, por exemplo:
JB-controlpanel.desktop
JB-java.desktop
JB-javaws.desktop
JB-jconsole.desktop
JB-jvisualvm.desktop
JB-mission-control.desktop
JB-policytool.desktop
unity-sound-panel.desktop
unity-tweak-tool.desktop
unity-universal-access-panel.desktop
unity-user-accounts-panel.desktop
unity-wacom-panel.desktop
unitywebappsqmllauncher.desktop
update-accounts.desktop
Agora, execute um comando awk
para mostrar os pacotes de cada arquivo com o comando apt-file search
:
awk '{printf "\n### %s ###\n",$1; system("apt-file search --regex /usr/share/applications/"$1"$")}' foo
Exemplo de saída no meu sistema:
$ awk '{printf "\n### %s ###\n",$1; system("apt-file search --regex /usr/share/applications/"$1"$")}' foo
### JB-controlpanel.desktop ###
### JB-java.desktop ###
### JB-javaws.desktop ###
### JB-jconsole.desktop ###
### JB-jvisualvm.desktop ###
### JB-mission-control.desktop ###
### JB-policytool.desktop ###
### unity-sound-panel.desktop ###
unity-control-center: /usr/share/applications/unity-sound-panel.desktop
### unity-tweak-tool.desktop ###
unity-tweak-tool: /usr/share/applications/unity-tweak-tool.desktop
### unity-universal-access-panel.desktop ###
unity-control-center: /usr/share/applications/unity-universal-access-panel.desktop
### unity-user-accounts-panel.desktop ###
unity-control-center: /usr/share/applications/unity-user-accounts-panel.desktop
### unity-wacom-panel.desktop ###
unity-control-center: /usr/share/applications/unity-wacom-panel.desktop
### unitywebappsqmllauncher.desktop ###
unity-webapps-qml: /usr/share/applications/unitywebappsqmllauncher.desktop
### update-accounts.desktop ###
unity-control-center-signon: /usr/share/applications/update-accounts.desktop
E o segundo teste com awk
e dpkg -S
$ awk '{printf "\n### %s ###\n",$1; system("dpkg -S "$1)}' foo
### JB-controlpanel.desktop ###
dpkg-query: no path found matching pattern *JB-controlpanel.desktop*
### JB-java.desktop ###
dpkg-query: no path found matching pattern *JB-java.desktop*
### JB-javaws.desktop ###
dpkg-query: no path found matching pattern *JB-javaws.desktop*
### JB-jconsole.desktop ###
dpkg-query: no path found matching pattern *JB-jconsole.desktop*
### JB-jvisualvm.desktop ###
dpkg-query: no path found matching pattern *JB-jvisualvm.desktop*
### JB-mission-control.desktop ###
dpkg-query: no path found matching pattern *JB-mission-control.desktop*
### JB-policytool.desktop ###
dpkg-query: no path found matching pattern *JB-policytool.desktop*
### unity-sound-panel.desktop ###
app-install-data: /usr/share/app-install/desktop/unity-control-center:unity-sound-panel.desktop
### unity-tweak-tool.desktop ###
app-install-data: /usr/share/app-install/desktop/unity-tweak-tool:unity-tweak-tool.desktop
### unity-universal-access-panel.desktop ###
app-install-data: /usr/share/app-install/desktop/unity-control-center:unity-universal-access-panel.desktop
### unity-user-accounts-panel.desktop ###
app-install-data: /usr/share/app-install/desktop/unity-control-center:unity-user-accounts-panel.desktop
### unity-wacom-panel.desktop ###
app-install-data: /usr/share/app-install/desktop/unity-control-center:unity-wacom-panel.desktop
### unitywebappsqmllauncher.desktop ###
app-install-data: /usr/share/app-install/desktop/unity-webapps-qml:unitywebappsqmllauncher.desktop
### update-accounts.desktop ###
app-install-data: /usr/share/app-install/desktop/unity-control-center-signon:update-accounts.desktop
Na primeira coluna, você pode ver o nome do pacote, por exemplo unity-tweak-tool
e você não deve remover manualmente os arquivos na segunda coluna. Você deve excluir os pacotes, se isso for realmente necessário. Mas você pode excluir os arquivos sem pacote, por exemplo JB-controlpanel.desktop
na saída acima, com um comando como este:
sudo rm JB-controlpanel.desktop
e assim por diante.