Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like to experiment with lots of different software in my Ubuntu install. Then, every time Ubuntu reaches a new release cycle, I simply do a clean install (instead of upgrading) to get rid of all the extra software (and their respective config files/folders). The only thing I always backup and carry to the next install (besides personal files) are the config files for gnome, so my desktop is always the way I like it. =)

The problem with that, is that the different packages I test out never get properly uninstalled, so my gnome main menu is full of broken links referring to software I had in previous installations (which got carried over because I kept the gnome config files).

Is there any automated way to go through my gnome main menu and remove any broken links? I know how to manually edit the menu, and I could go through it myself, but I'm looking for some script or package that will clean for me so I wouldn't have to do it manually every release cycle.

share|improve this question
I guess that people do not read the question before answering. Not a single answer in the topic ... BTW, did you find a good solution since then ? – Raphael Jolivet Dec 30 '12 at 20:19
@RaphaelJolivet No, but I stopped using ubuntu shortly after asking this question. – Malabarba Jan 6 '13 at 1:31

Well, I found this script

export PACKAGES=$(dpkg -l | awk '{if ($1 == "rc") print $2" "}' | tr -d '\n') [ -n "$PACKAGES" ] && sudo apt-get purge $PACKAGES

on that shall purge the removed installations. So maybe it could work also for purging menu.

share|improve this answer

To really-really-really :P reset your Gnome menu enter this command:

rm -rf .local/share/applications/*

I came across this bug in 2008, and I don't know if it's being fixed, BTW it's annoying.

share|improve this answer
sudo apt-get autoremove

this one worked perfectly for me

share|improve this answer

Open Synaptic and select from the left menu under All/Installed/ect. not installed (residual config)

share|improve this answer
are you sure this works for such situations? – RolandiXor Apr 11 '11 at 0:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.