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

Pharmakon - the Morphine Paradox
13 Dec 2024 - 13:19
Post-corporate future pipedream
13 Dec 2024 - 13:10
Why 'free' proprietary software will always end in tears
4 Oct 2023 - 01:00
Missing link in South Christchurch active transport network: the Gauntlet
21 Sep 2023 - 09:08
Aotearoa government IT concerns
18 Sep 2023 - 09:41
Why the covered CBD Stadium is a horrible idea for Christchurch
23 Sep 2022 - 21:02
Are we worthy?
5 Apr 2022 - 10:15

Pagination

  • Previous page
  • 2
  • 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