Keep or replace the file

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
arky

Keep or replace the file

Post by arky »

I have installed linux mint a number of times, Xfce, Mint, and KDE and I
have been meaning to ask this question for a long time but it seems that
I always forget about it.

When Mint is nearly to the end of installing to the hard drive, it pauses
to ask a question about a configuration file ( I can't remember the
name of the file, and I always forget to write it down) as to whether you should
keep or replace the file. I have always answered replace, but I don't
know if that is the right answer.

Can someone comment on why this is and what answer you should
select and why ?

Thanks,
Arky
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Keep or replace the file

Post by jimallyn »

Interesting. I have never seen that when installing any version of Mint. The only time I have seen something like that is when doing upgrades. I the upgrade includes a new config file, it will ask you that. But other than that? Never seen it.
“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan
WharfRat

Re: Keep or replace the file

Post by WharfRat »

The few times I was prompted to replace a file I answered yes because I knew I hadn't changed it.

Normally when you answer yes a backup of the old version is created with the suffix .dpkg-old

So see if you have any .dpkg-old files with sudo updatedb && locate .dpkg-old

I have to echo jimallyn's response as far as installation goes :?
gold_finger

Re: Keep or replace the file

Post by gold_finger »

I've never seen that during an install either -- only during updates to system. My guess is that you checked the option to install updates during the installation and that is why you're seeing it. (I never check that option during install. Do updates separately after install completes.)

Anyway, default answer to question of "keep or replace?" is to keep existing config file. Many times it doesn't really matter whether you keep or replace, but sometimes it might. Reason why (as I understand it) is that Mint (or any Linux distro) is a conglomeration of software packages, many of which are not maintained directly by Mint developers. The default config files made by the individual package maintainers are probably used "as-is" by Linux distros most of the time, therefore choosing "replace" doesn't matter. But, there can be cases where Mint (or other distros) may change/customize the maintainer's default config to make it more suitable for their distro. If you replace a config that was one that the Mint team had customized then the software depending on that config may behave/look/feel differently with the replacement config than with the customized Mint config. (If you run into anything like that and want to change it back, follow WharfRat's post to find the old config file.)
MintyO

Re: Keep or replace the file

Post by MintyO »

I'll echo what has been said. Also, if you someone's keeping score, I generally choose replace. A while back this caused it to say "Ubuntu" in grub menu, but I didn't apply any manual fixes. Few days (~week) passed and some update fixed the problem.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Keep or replace the file

Post by Cosmo. »

@arky:
Your remembrance is misleading you. If you install the system (which should be done with formatting the partition, where Mint gets stored), there is obviously nothing, what can be changed. In case of updates this question can appear (only in seldom cases). I have noticed a few reports here, where the user felt into a problem, when he has chosen to replace the config file. So I recommend to select to keep it.

In theory this question can only come up during installation, if either the guess by gold_finger matches your case or if you did not format the system partition during install. If it happens in one of both cases: I don't know, because I never did the one or other.
arky

Re: Keep or replace the file

Post by arky »

My bad; my memory must be failing me.

I just installed Mint 18.1 MATE on another desktop and
the file that Mint asks you to either keep or replace is after
you install Mint and when you install the updates.

When the updates are downloaded and the installation
is about 90% done, it halts and this is what is shown:

"Replace configuration file /etc/gnome/defaults.list ?

The configuration file /etc/gnome/defaults.list was modified
(by you or by a script). An updated version is shipped in this package.
If you want to keep your current version, say 'Keep'.
Do you want to replace the current file and install the new
package maintainers version ?"

You are given a choice of clicking one of two buttons,
'Keep' or 'Replace'.

You can also click the drop down to see the difference
between the two files.

The current version appears to be called /etc/gnome/defaults.list
and is dated 2016-12-13.

The updated version appears to be called /etc/gnome/defaults.list.dpkg-new
and is dated 2017-02-19.

I have always clicked replace, but I have no idea if that is the right choice.

Arky
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Keep or replace the file

Post by Cosmo. »

As I already wrote in my previous post: Select to keep it.
Habitual

Re: Keep or replace the file

Post by Habitual »

arky wrote:I have installed linux mint a number of times, Xfce, Mint, and KDE and I
have been meaning to ask this question for a long time but it seems that
I always forget about it.

When Mint is nearly to the end of installing to the hard drive, it pauses
to ask a question about a configuration file ( I can't remember the
name of the file, and I always forget to write it down) as to whether you should
keep or replace the file. I have always answered replace, but I don't
know if that is the right answer.

Can someone comment on why this is and what answer you should
select and why ?

Thanks,
Arky
The dpkg system does a hash check of "the files to be installed" included in the package.
If the sum is different from the package, install prompts.
So, you install openssh-server and modify /etc/ssh/sshd_config to harden it
Keep/Accept/Merge/View differences side-by-side/ will prompt should you upgrade openssh-server and it wants to re-copy /etc/ssh/sshd_config
you will be prompted, IF your installed copy of /etc/ssh/sshd_config has changed.

I always KEEP the local file which is the default as they have been edited.
Locked

Return to “Installation & Boot”