3

I tried multiple things to get this to work, but it's not working:

I'm running sudo apt-get upgrade and get the following error:

Preparing to unpack .../base-files_10.1ubuntu2.2_amd64.deb ...
Unpacking base-files (10.1ubuntu2.2) over (9.4ubuntu4.13) ...
dpkg: error processing archive /var/cache/apt/archives/base-files_10.1ubuntu2.2_amd64.deb (--unpack):
 trying to overwrite '/etc/default/motd-news', which is also in package motd-news-config 9.4ubuntu4.13
Errors were encountered while processing:
 /var/cache/apt/archives/base-files_10.1ubuntu2.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I fix this?

ubfan1
  • 17,838
mcadio
  • 133

1 Answers1

8

Then force installation of base-files by

sudo dpkg -i --force-all /var/cache/apt/archives/base-files_10.1ubuntu2.2_amd64.deb

and resume upgrade by

sudo apt-get install -f
sudo apt-get dist-upgrade
N0rbert
  • 99,918
  • Thank you!!! That was driving me nuts. I wanted to stay up to date, but couldn't find the solution anywhere. – mcadio Oct 12 '20 at 13:36
  • the 2nd command should be sudo apt-get upgrade. OP is not looking for distribution upgrade – Raptor Aug 28 '23 at 06:17