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 8 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

Why is mainstream social media so damn 'user friendly'?
4 Aug 2025 - 11:54
Just a thought: Fediverse is different
4 Aug 2025 - 11:53
Windows broken by design
4 Aug 2025 - 11:53
Computer Operating System Analogy
1 Aug 2025 - 15:41
Online voting continues to be a very bad idea in 2025 and beyond
14 Jan 2025 - 17:14
Societal response to acute isolated harm vs. harm that's widespread but less intense
13 Dec 2024 - 14:27
Enough is enough!
13 Dec 2024 - 13:27

Pagination

  • 1
  • 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