Jul 20

If you are using an OS based on the Synaptic Package Manager, you must have noticed by now that when trying to install a new package through Synaptic, it draws in miscellaneous packages that are needed for the program to work. These packages are called dependencies .

Yet, you might have not noticed that when removing the first-original package, Synaptic doesn’t automatically remove the dependencies that were installed with it. I don’t have much experience with other Package Managers, so I don’t know if they behave in a similar way. If you do, please post a comment for them below.

There are two options in Synaptic for removing a package:

  • Mark for removal – This simply removes the marked package
  • Mark for complete removal – Removes the marked package and it’s configuration files

None of the above gives you the choice of removing the dependencies that came with the package.

To do this, I open a terminal and use the command:

$ sudo aptitude purge X

where X is the name of the package I want to completely remove..

If you already removed applications using Synaptic and you want to clear your PC from any unneeded packages, usually called orphaned files, here are two ways of doing it. The first one uses Synaptic and the second one is through the Terminal.

Using Synaptic

  1. Search for the package “deborphan” and install it.
  2. Open Settings>Filters and create a new filter (I usually name it deborphan, or orphaned, but you can put any name that suites you).
  3. Press Deselect all and then choose only “Orphaned” under the “other” column..Press OK to save it..
  4. On the main window of Synaptic, select “Custom” from the bottom left, and then click on the filter you created.. This will list all the orphaned packages on your PC.
  5. Remove the packages you wish.

Using the Terminal

  1. Type in the command: $ sudo apt-get autoremove
  2. Press Y (YES) to delete any any packages found.

Make sure you use all the information above with cautious! Check and double-check what you remove..If you don’t understand what you are doing, then you probably better do nothing..No harm done by some extra packages!

12 Responses to “How to completely remove an application with apt, aptitude, Synaptic”

  1. FreeBooteR says:

    I like the looks of your blog, and good info for new comers.

  2. archuser says:

    “How to completely remove an application in GNU/Linux”?

    Use Arch Linux and Pacman. 🙂

  3. kart0ns says:

    apt-get autoremove is risky if you have more than one desktop (XFCE, GNOME etc). It deinstalls both desktops. At least I got my Desktops and apps gone from all directories and so on.

  4. emanuele says:

    Actually this is the way to remove sw only on a Debian-Ubuntu system

  5. Magic Banana says:

    Or you can use aptitude…

  6. tetris4 says:

    @ kart0ns: Thnx for the risk note. Its g00d to have that in mind.

    @ emanuele: Could you suggest ways to do it on other systems? or other Package Managers? I would be obliged..

    @ Magic Banana: Well, did u read the post? I actually did use aptitude =p

  7. Azerrthoth says:


    # emerge -C $package
    — This removes the package

    # emerge -uDNatv world
    — This ensures all your packages and dependancies are up to date, equiv to apt-get upgrade

    # emerge –depclean
    — This removes any unused dependencies that remain on your system

  8. Azerrthoth says:

    oops last should have been

    #emerge –depclean

  9. Azerrthoth says:

    arrg, your blog is removing doubled – signs

  10. Hal says:

    After removing a package with synaptic, i just launch “sudo gtkorphan” to get rid of the useless dependencies, gtkorphan has a nice user friendly interface .. I recommend it

  11. tetris4 says:

    Since am an Arch user now, this is what I type in the terminal to achieve this:

    sudo pacman -Rns nameofthepackage

    which will “Remove the specified package(s), its configuration(s) and unneeded dependencies”

Leave a Reply

preload preload preload