So you just got a shiny new something.pacnew
file.
You get these when a system file has been modified from the upstream default. If the file has been modified, it is assumed (and rightly so) that there’s a reason it was modified, and so instead of overwriting the file with the upstream defaults a .pacnew
file is created.
Here’s some common-sense advice:
Before doing anything, make a backup copy of both the original file and the pacnew file. So, using passwd
as an example, you’d have 2 copies: passwd.bak
and passwd.pacnew.bak
(you could use a different extension other than .bak
if you like).
Now you’ve got an untouched, original copy of both files. If something goes wrong, you can replace the file you borked with the copy of the original file, and start all over again from a clean slate.
As to merging the files - don’t automate it by hitting a “merge” button in some application. Look at what the changes are, think about what these changes are, and then make the necessary changes yourself.
If a file contains passwords, or user accounts, the pacnew file obviously won’t have those - upstream doesn’t know what your username is, or what your passwords are. Blindly overwriting something like passwd
or shadow
is recipe for disaster. But if you made a backup of the original file, you can easily recover.
So, please - make a backup copy before changing a system file.