Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is /etc/apt/apt.conf.d/50unattended-upgrades.ucf-old and can I safely delete it?

I've recently upgraded from Ubuntu 14.04 to 16.04. A few things didn't make it across, for example the ttf-mscorefonts-installer (no idea why), and while I was trying to install them that I got a warning.

The command...

sudo apt-get install <package>

...as well as producing the usual behavior, also produced multiple instances of the warning...

N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension

There is a file with the same name but without the .ucf-old extension in the same directory. Is this a relic of the upgrade process? Can I just delete the "old" file?

like image 364
Adam Smith Avatar asked Oct 17 '22 19:10

Adam Smith


1 Answers

The file 50unattended-upgrades.ucf-old is created by the utility ucf ["update configuration files"] which interacts with the user during the upgrade, asking whether to overwrite or retain a copy of old configuration files. The one with the suffix .ucf-old is the copy. It is retained for reference and can be deleted safely.

From the ucf manpage:

During the course of operations, when working with configuration files, ucf optionally creates copies of versions of the configuration file in question. For example, a file with the suffix ucf-old holds the old version of a configuration file replaced by [the utility] ucf. [...] the maintainer scripts should consider purging copies of the configuration file with these extensions during purge.

The behavior of ucf is described on askubuntu.

like image 86
Adam Smith Avatar answered Oct 20 '22 09:10

Adam Smith