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

The TPPA in a Nutshell
4 Feb 2016 - 17:11
Historical Perspective: the US and FTAs
2 Feb 2016 - 11:47
The TPPA: Flawed in Principle
1 Feb 2016 - 13:39
The Toxicity of Public Multinational Corporations
28 Jan 2016 - 14:15
Non-nerd upgrading intolerable Windows 8... to Linux Mint
8 Dec 2015 - 23:00
2 Step Howto to set up a local wildcard domain resolution on Ubuntu/Linux Mint
5 Nov 2015 - 11:18
FOSS alternative to Equella for tertiary institutions
3 Nov 2015 - 12:52

Pagination

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