You are not logged in.

#1 2016-09-25 21:12:08

TheChaoticR
Member
Registered: 2016-09-25
Posts: 2

[Solved] Deleted /usr/share/applications folder, How Can i Restore it?

I deleted the folder by mistake and now lost all icons in the menu and in the Settings app for Gnome. What can i do? Will it require a full reinstall?

Edit: Problem solved using promarbler14's tip.

Last edited by TheChaoticR (2016-09-26 22:25:05)

Offline

#2 2016-09-25 21:20:25

null
Member
Registered: 2009-05-06
Posts: 398

Re: [Solved] Deleted /usr/share/applications folder, How Can i Restore it?

All packages that place files in a folder "own" the folder in pacman terms. So you could reinstall all packages from

pacman -Qqo /usr/share/applications

Last edited by null (2016-09-25 21:21:00)

Offline

#3 2016-09-25 21:24:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: [Solved] Deleted /usr/share/applications folder, How Can i Restore it?

null wrote:

All packages that place files in a folder "own" the folder in pacman terms. So you could reinstall all packages from

pacman -Qqo /usr/share/applications

Or, you can use pacman -Qk to identify packages that have missing files and install only those


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2016-09-25 22:12:42

null
Member
Registered: 2009-05-06
Posts: 398

Re: [Solved] Deleted /usr/share/applications folder, How Can i Restore it?

Hmh. Didn't know about the -k switch. But the output doesn't seem to be filterable for only packages that have missing files? At least the man page doesn't reveal anything and the output is quite verbose and needs grep'ing or awk'ing to get usable results. 'pacman -Qqo /usr/share/applications' should in a situation where you deleted the whole folder also only show packages that have missing files, or am I missing something?

Last edited by null (2016-09-25 22:51:31)

Offline

#5 2016-09-25 22:40:05

TheChaoticR
Member
Registered: 2016-09-25
Posts: 2

Re: [Solved] Deleted /usr/share/applications folder, How Can i Restore it?

I used pacman -Qk and got the list with all the packages with missing files, but can't reinstall with pacman -S. It says that the [package] is updated and ends the command. Am i missing something?

Offline

#6 2016-09-25 23:24:43

promarbler14
Member
From: MD, U.S.
Registered: 2016-03-28
Posts: 40

Re: [Solved] Deleted /usr/share/applications folder, How Can i Restore it?

Perhaps you have a foreign package. Try this one-liner: pacman -S `pacman -Qqo /usr/share/applications | xargs pacman -Qqn`

Offline

#7 2016-09-26 08:11:03

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] Deleted /usr/share/applications folder, How Can i Restore it?

null wrote:

Hmh. Didn't know about the -k switch. But the output doesn't seem to be filterable for only packages that have missing files? At least the man page doesn't reveal anything and the output is quite verbose and needs grep'ing or awk'ing to get usable results.

The -q switch applies here as well:

$ pacman -Qqk | cut -d\  -f1
TheChaoticR wrote:

can't reinstall with pacman -S. It says that the [package] is updated and ends the command.

Please don't paraphrase: https://bbs.archlinux.org/viewtopic.php?id=57855

Offline

#8 2016-09-26 09:18:32

beta990
Member
Registered: 2011-07-10
Posts: 207

Re: [Solved] Deleted /usr/share/applications folder, How Can i Restore it?

TheChaoticR wrote:

I used pacman -Qk and got the list with all the packages with missing files, but can't reinstall with pacman -S. It says that the [package] is updated and ends the command. Am i missing something?

Should the --force flag be used?
This force reinstalling the whole package again.

Last edited by beta990 (2016-09-26 09:19:19)

Offline

#9 2016-09-26 11:00:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,846
Website

Re: [Solved] Deleted /usr/share/applications folder, How Can i Restore it?

beta990 wrote:
TheChaoticR wrote:

I used pacman -Qk and got the list with all the packages with missing files, but can't reinstall with pacman -S. It says that the [package] is updated and ends the command. Am i missing something?

Should the --force flag be used?

No.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB