Skip to main content
Home
Dave Lane

Main navigation

  • Abilities
  • Blog
  • CV
  • About
    • About
    • This Site
    • Commercial Terms
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home

Fixing the 'trying to overwrite' error when updating a GNU/Linux system via apt/apt-get

Profile picture for user dave
By dave , 16 November 2021

I recently ran into an issue upgrading a Ubuntu 18.04-powered server I run. I usually run the following command:

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt list --upgradable && df -h && sudo service nginx reload

but it failed trying to install, of all things, an upgrade 'vim-tiny' package with an error:

dpkg: error processing archive /var/cache/apt/archives/vim-tiny_2%3a8.0.1453-1ubuntu1.7_amd64.deb (--unpack):
trying to overwrite '/usr/share/vim/vim80/doc/help.txt', which is also in package vim-runtime 2:8.0.1453-1ubuntu1.7
Errors were encountered while processing:
/var/cache/apt/archives/vim-tiny_2%3a8.0.1453-1ubuntu1.7_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I was stuck. A quick search suggested that I try the command:

sudo apt --fix-broken  install

but that didn't work either, failing with precisely the same error as above.

Finally, after much searching, I found the right answer:

sudo dpkg --configure --force-overwrite -a

I hope this helps someone!

 

 

The content of this field is kept private and will not be shown publicly.
About text formats

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
CAPTCHA
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

C A Exton (not verified)

3 years 3 months ago

Very good! Thanks a lot!

Very good! Thanks a lot!

  • Reply

MarcG (not verified)

2 years 9 months ago

In reply to Very good! Thanks a lot! by C A Exton (not verified)

thanks!! that got me going on

thanks!! that got me going on jammy upgrade !!

  • Reply
  • Add new comment

Note to commenters: due to problems with spam comments, your comment will only appear on this site after it's been deemed (by me) to be legitimate.

Blog posts

Fixing the 'trying to overwrite' error when updating a GNU/Linux system via apt/apt-get
16 Nov 2021 - 14:21
Suggestions for Aotearoa New Zealand's Digital Strategy
10 Oct 2021 - 20:15
Explainer: Digitech risks for School Boards
13 Jun 2021 - 20:59
Further to open communities using closed tools
14 May 2021 - 10:58
22 Feb 2011 Canterbury Quake story
28 Feb 2021 - 11:23
The current (digital) Dark Age
10 Feb 2021 - 22:57
Providing open source tools for open communities
8 Feb 2021 - 11:50

Pagination

  • Previous page
  • 3
  • Next page
More posts...
RSS feed

Creative Commons License - CC By attribution, Share alike - International 4.0

Contact Dave!
Download Dave's CV
Eliminate DRM!

Contact Modes

Social Media

Software

Terms of Engagement
Terms of Reference
Powered by Drupal