| Written by: | Alexio |
Score: 17 votes: 29 Format: Article |
How to fix broken packages using the Command Line
Using please note that it is bad practice to use aptitude and apt-get interchangeably, as they record separately the changes made by a user.
sudo aptitude update && sudo aptitude install gtkorphan
It brings up a beautiful interface to search, navigate, install, update and otherwise to manage packages.
Use the commands on the screen to install all the updates. You may use the mouse or CTRL + T to open the menu. Also, you could use the arrow keys and the Enter key to navigate.
You can also install the Aptitude Package Manager if you want to use something like Synaptic. Just type aptitude-gtk in the search field of the Mint Menu and click on Install package 'aptitude-gtk'. You can then find it under the Administration menu.
You may also use other commands to:
- install software for your system, with needed dependencies as well:
sudo aptitude install
- remove packages as well as orphaned dependencies:
sudo aptitude remove
- remove packages and orphaned dependencies, as well as any configuration files left behind:
sudo aptitude purge
- search for packages in the local apt package lists:
sudo aptitude search package-name
- show details about a package:
sudo aptitude show package-name
- update the local packages lists:
sudo aptitude update
- upgrade any installed packages that have been updated:
sudo aptitude upgrade
- upgrade packages, even if it means uninstalling certain packages:
sudo aptitude dist-upgrade
- delete only out-of-date packages, but keep current ones:
sudo aptitude autoclean
- delete any downloaded files necessary for installing the software on your system:
sudo aptitude clean
- fix a package at it’s current version, and don’t update it:
sudo aptitude hold
Recommended reading: Aptitude vs Apt-Get
Tags: CLI aptitude fix broken packages
Created: 6 years ago.
Last edited: 6 years ago.
Reviewed: 6 years ago.
Read 1680 times.
| Comments | |||
| 2 months ago |
Sam_Sung |
there is no aptitude-gtk package to be found in synaptic | |
| 2 months ago |
Sam_Sung |
lifesaver! | |
| 1 year ago |
Alexio |
Using aptitude for package management instead of apt-get (via Synaptic), please note that it is bad practice to use aptitude and apt-get interchangeably, as warned at the very beginning of this tutorial. | |
| 1 year ago |
Anaemic |
It is not necessary to install a program to fix broken packages. Open Synaptic Package Manager > click edit > click Fix Broken Packages |
|
| 1 year ago |
Alexio |
Try the command: aptitude why-not package where package is the name of the package you want to install. For details see http://unix.stackexchange.com/questions/121149/fix-held-broken-packages-on-debian |
|
| 2 years ago |
gorade |
Very nice and instructive. only it didn't solve the problem. The irksome "solve the problem with broken packages" is still there. I am accused for "holding back broken packages". What do I do wrong? | |
| 2 years ago |
Fokir |
Nice and straight. We like this | |
| 2 years ago |
Xzoma |
Works great thanks | |
| 3 years ago |
linux1492 |
This article rules!!! Thanks so much. Well done. | |
| 4 years ago |
ssj_satish |
Nice article. Solved the problem, I was hunting for 3 days. Thanks a lot. |
|
| 4 years ago |
jaredchu |
sudo aptitude -f this command removed all my package, when i come back my computer return black screen and nothing in there... |
|
| 6 years ago |
blueXrider |
Good information. | |
| 6 years ago |
remoulder |
I didn't say your post was an idea, following your instructions is not a good idea. It may well have worked for you but you probably understand what you are doing. An inexperienced user doing this could cause themselves problems. | |
| 6 years ago |
Alexio |
This is a tutorial and not an idea :) It worked well for me and for others when Synaptic was not able to fix the broken packages. It is possible to install a nice front-end to aptitude called "aptitude-gtk". | |
| 6 years ago |
remoulder |
This is not a good idea, users should understand what is causing the broken packages, not just force a fix or they could end up removing needed software. Besides imo, it is easier to see what is going on using synaptic rather than aptitude. | |
Other tutorials from Alexio
- Ubuntu Pocket Guide and Reference
- The Linux Documentation Project
- The GNOME 2.32 Desktop User Guide
- How to make a dual-boot into Windows put the "pagefile.sys" onto the linux-swap partition
- GNU/Linux Desktop Survival Guide
- Ubuntu Manual
- Keyboard Shortcuts for the GNOME Desktop
- Linux From Scratch
- Keyboard Shortcuts for the KDE Desktop
- Download entire websites easy
- How-to index on the Linux Mint forum
- Search Launchpad PPAs and add them to your software repositories list
- Ubuntu Apps - application directory, tips, and customization guide
- Linux Terminal Command Reference
- How to get and install Linux games - Full tutorial
- OpenOffice.org and LibreOffice Keyboard Shortcuts
- Install and Optimize Linux Mint on a Solid State Drive
- Run Linux Mint in Windows without any configuration or installation
- A quick way to make Linux Mint look like Mac OS X
- Install LibreOffice 3.3 on Linux Mint 9 and 10
- Install Firefox 9 Final on Linux Mint 9 and 10
- Reset forgotten/lost main user password in Linux Mint
- How To Save Downloaded Files to Selected Folders based on Filters
- Linux Filesystem Explained
- Assign Custom Shortcut Keys in Linux Mint
- Install Nautilus Elementary on Linux Mint 10
- Install fonts on Linux Mint using Terminal commands
- How to manage the recent notifications for the GNOME desktop
- How to add videos to the Linux Mint Community Videos website
- Upgrade to Firefox 29 Beta and test Firefox 31 Alpha on Linux Mint
- How to setup the fastest server for updates using Synaptic
- Rotate Your Wallpapers with Webilder in Linux Mint 11
- Converting Audio Files On Linux Mint
- Popper - the e-mail notifier and indicator
- Upgrade Thunderbird to version 12 Beta or to version 15 Alpha on Linux Mint
- How to easily download files from more than 40 websites, including Linux Mint videos
- How to enable unattended software updates on Linux Mint
- MultiSystem – Create a MultiBoot USB from Linux Mint
Ideas
Tutorials
Hardware
Software
Countries
Users
Moderation
Chat room
ISO Images