You are not logged in.

#1 2013-04-20 16:28:00

jrussell
Member
From: Cape Town, South Africa
Registered: 2012-08-16
Posts: 510

reinstall a package and overwrite config files

Hi, is there any way to reinstall a package which would be equivalent to:

pacman -Rn package
pacman -S package

So old config files would be replaced? I know I can just manually delete the files, but I'm just curious smile
I didn't find anything in the pacman/pacmanTips wiki.


bitcoin: 1G62YGRFkMDwhGr5T5YGovfsxLx44eZo7U

Offline

#2 2013-04-20 16:58:42

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: reinstall a package and overwrite config files

If the config files are part of the package (like example configs inside /etc) then reinstalling the package should overwrite it or at least create a pacsave/pacnew. If the config files are inside $HOME, they will not be touched at all. They must manually be deleted.

Offline

#3 2013-04-20 17:20:54

jrussell
Member
From: Cape Town, South Africa
Registered: 2012-08-16
Posts: 510

Re: reinstall a package and overwrite config files

anonymous_user wrote:

If the config files are part of the package (like example configs inside /etc) then reinstalling the package should overwrite it or at least create a pacsave/pacnew. If the config files are inside $HOME, they will not be touched at all. They must manually be deleted.

This doesnt happen for any 'backed up' config files for packages as defined in the PKGBUILD (I think?).

For example, I want to reinstall pulseaudio and get fresh config files, just running

pacman -S pulseaudio

does not create pacsave/pacnew files, the old config file in /etc just remains and is used by the new install of pulse.

Last edited by jrussell (2013-04-20 17:22:20)


bitcoin: 1G62YGRFkMDwhGr5T5YGovfsxLx44eZo7U

Offline

#4 2013-04-20 17:33:06

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: reinstall a package and overwrite config files

Offline

#5 2013-04-20 17:44:34

aesiris
Member
Registered: 2012-02-25
Posts: 97

Re: reinstall a package and overwrite config files

You don't need to reinstall the package.
Pacman archives are just compressed tar, so it is easy to copy just that file by yourself.

For example

mkdir /tmp/pulse
cd /tmp/pulse
tar xf /var/cache/pacman/pkg/pulse...
cp /tmp/pulse/etc/... /etc/...

Offline

#6 2013-04-20 18:23:26

jrussell
Member
From: Cape Town, South Africa
Registered: 2012-08-16
Posts: 510

Re: reinstall a package and overwrite config files

anonymous_user wrote:

Yes, I know how pac files work, perhaps I didnt phrase my question properly, I would like to know if there is a pacman argument/command that I could use when re installing a package which would overwrite any config file (that would otherwise be left alone during a reinstall) for that package.

I know I could just copy it out of the cache, but I just want to know if there is some way pacman could do it smile


bitcoin: 1G62YGRFkMDwhGr5T5YGovfsxLx44eZo7U

Offline

#7 2013-04-20 18:27:57

HalosGhost
Forum Fellow
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: reinstall a package and overwrite config files

Ahh, the best place to look for that, of course, is the man page.

On a related note, using that argument (if it exists) would be an awful idea. Pacman uses .pac{new,save} files for a very good reason. Blindly overwriting those files could easily break something.

All the best,

-HG

Offline

Board footer

Powered by FluxBB