Restore Synaptic Mark All Upgrades Button in Linux Mint

July 16, 2013 by
Filed under: HowTo, linux, Linux Mint 

UPDATE: This technique no longer works on Linux Mint 17 Qiana. Please see Enable Synaptic Mark All Upgrades Button in Linux Mint 17 for the latest technique.

I recently reviewed Linux Mint 15 Cinnamon Edition and one reader pointed out in the comments that the Mint team removes functionality from the Synaptic Package Manager. Specifically, the Mark All Upgrades button is missing from the tool bar and the menu selection is also missing from the Edit menu. After doing a little bit of research, I was able to figure out how to undo the changes made to Synaptic by the Linux Mint team. In the following tutorial I'll show how to restore the Synaptic Mark All Upgrades button in Linux Mint.

Where did that button go?

As I mentioned in the introduction, the Mark All Upgrades button is missing from Synaptic in Linux Mint. I think the philosophy of the developers is that you should use the Mint Update Manager with its priority system to apply system package updates. If you're coming to Linux Mint from Ubuntu or Debian, then you're probably used to being able to anything you want in Synaptic.  Click on the screenshot below to see how Synaptic looks in a default installation of Linux Mint 15.

Synaptic in Linux Mint as shipped

Synaptic in Linux Mint as shipped - Click to enlarge

Affiliate Link

As you can see, there is no Mark All Upgrades button on the toolbar.

Re-enable the Synaptic Mark All Upgrades button

The key to getting the button back is knowing where the Linux Mint customizations are made to its Ubuntu base. Some of these customizations are done with small files in the /etc/linuxmint/adjustments directory. There is a file in that directory called 10-mintsystem-synaptic.overwrite. You could delete that file, reinstall Synaptic, and sure enough you'd have your button back. The problem is, updating your system is likely to put that file right back there and taking the button away again. But there is an easy solution. From the README file in that directory:

.overwrite files define files which are to be overwritten. Each line in these files trigger the overwriting of the destination by the source, with the line following the format:

source destination

.overwrites files are read by alphabetical order and all overwritings are done in the end. If a destination appears more than once, only its last occurence is taken into account.

.preserve files are read at the beginning. They can contain a list of destinations (one by line). Each destination appearing in a .preserve file doesn't get overwriten, whether or not it appears in .overwrites files.

So as you can see from the README file, all you need to do is create a .preserve file with the correct lines in it and that will prevent the .overwrite file from being used. I'm going to create a file called 05-synaptic.preserve in the /etc/linuxmint/adjustments directory with the following content:

/usr/share/synaptic/glade/window_main.glade
/usr/share/synaptic/gtkbuilder/window_main.ui

You can use sudo and your favorite text editor to create and save that file, or you can just paste the following long command into a terminal window.

echo /usr/share/synaptic/glade/window_main.glade | sudo tee -a /etc/linuxmint/adjustments/05-synaptic.preserve && echo /usr/share/synaptic/gtkbuilder/window_main.ui | sudo tee -a /etc/linuxmint/adjustments/05-synaptic.preserve

Now that you have your .preserve file you need to reinstall Synaptic. Use this command to take care of that.

sudo apt-get --reinstall install synaptic

Now open up the Synaptic package manager and you should now see the Mark All Upgrades button on the toolbar. If for some reason you don't see the button, try rebooting your system.

Synaptic with Mark All Upgrades enabled

Synaptic with Mark All Upgrades enabled - Click to enlarge

How to remove the button again

I don't know why you'd want to, but if you ever want to change Synaptic back to the way it was without the button, just remove the .preserve file that you made and reinstall Synaptic.

sudo rm /etc/linuxmint/adjustments/05-synaptic.preserve
sudo apt-get --reinstall install synaptic

Reboot your system and when you start Synaptic again you will see that the Mark All Upgrades button is gone again.

So what's your preferred way to handle updates? Do you like Synaptic? Update Manager? Command line? Let me know in the comments.

This content was originally published at http://tuxtweaks.com/2013/07/restore-synaptic-mark-all-upgrades-linux-mint.

Comments

8 Responses to “Restore Synaptic Mark All Upgrades Button in Linux Mint”

  1. Jamie says:

    I've seen this "solution" many times. It may have worked in 2011 (when it was posted on mint forums), but it hasn't worked for me now in 2014.

  2. Mikk says:

    Cheers, it is my preferred method to mark all updates as used in other 'distros', so I'm glad I tried your link first

    Thanks for the heads up, but I must get on my soapbox here and complain about the geeky way you're instructing people to achieve it. It's no wonder people are put off trying Linux when confronted with long winded commands like this. Especially when most are not needed and can be accomplished via the GUI. A classic example is downloaded files that need the permissions changing to make them executable. Invariably you're told to enter a command in the terminal when it's much simpler to right click the file, pick properties and put a cross in the appropriate place in the permissions tab.

    For this fix I right clicked the desktop picked 'create document' copied and pasted the relevant lines, renamed it as the required name. Navigated to etc/linuxmint/adjustments and right clicked again and picked 'open as root' to delete the offending file and then add the new one. Then in synaptic I searched for itself, right clicked it and picked 'mark for reinstallation' Job done without using the terminal once. It might seem a long winded way of doing it in this example, but these are skills most people possess and give more understanding of what they're actually doing instead of (mostly blindly) copying a command into a terminal.

    Linux is awash with similar solutions to problems where they seem to delight in the most obscure command line cures without ever giving an easier option to try. I've been using Linux over a decade and I remember some head up his arse 'guru' who told me I'd never get anywhere in Linux without learning to love the 'grep' command!! 11 years later, I have still never used the grep command, nor do I see a time when I'll need to

    Oops, sorry for waffling on and thanks again for the cure

  3. Don Humberson says:

    I really do prefer apt-get, but I paid the cost to get up that learning curve a long time ago. Among GUI tools for Debian branch distros my top choice is Synaptic, both because it simply performs faster and because it gets in my way less.

  4. terry says:

    well that was so easy.....thankyou so much......
    not sure if i need this button but anyway...
    i am impressed

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>