Skip to content

Instantly share code, notes, and snippets.

@ryanpadilha
Last active May 30, 2025 22:21
Show Gist options
  • Save ryanpadilha/9d6c07e3ffa1f17934db021a95383276 to your computer and use it in GitHub Desktop.
Save ryanpadilha/9d6c07e3ffa1f17934db021a95383276 to your computer and use it in GitHub Desktop.
Commands to fix apt - E: Sub-process /usr/bin/dpkg returned an error code (1)
#!/bin/bash
sudo rm -rf /var/lib/dpkg/info/*.*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
sudo apt-get check
sudo apt-get -f install
sudo apt-get upgrade
@lovephotography
Copy link

Error fix nhi hua 😥

@Kuwpvr
Copy link

Kuwpvr commented Sep 10, 2024

worked like a charm, Thank you!

@Syn460
Copy link

Syn460 commented Oct 16, 2024

Worked!!!!!!!!!!

@osmaneamjad248
Copy link

Thanks for the heads up worked like charm

@mohdrihan1719
Copy link

Not working

@Nora1Meziani
Copy link

didn't work unfortunately :(

@Pitafis
Copy link

Pitafis commented Mar 14, 2025

Thank you brother my problem solved

@bayouran
Copy link

Work very well, thank's

@Roskovic232
Copy link

angel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment