15

apt-cache show firefox | grep Version and apt-cache show chromium-browser | grep Version in terminal is showing this output:

enter image description here

I guess, I've four versions of firefox and two versions of chromium-browser installed on my system. How can I safely uninstall the earlier versions of both, firefox and chromium?

It would help me for other softwares also, and always in future. Thank you!

3 Answers 3

34

Actually apt-cache does not show you which packages or even versions of packages you have got installed on your system. It just shows you detailed information of all available packages (and their versions) for your system. So do not worry about it.

If you want to clean up your system from old packages, dependencies and cached files (you may get a lot of free space after doing this):

sudo apt-get update && sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove

It's that easy.

1
  • Couldn't even do this. No space left on device. Will have to delete something else first... Was eventually able to delete 300MB more with this.
    – Akaisteph7
    Jan 3 at 16:55
3

To answer your question about uninstalling, the command is:

apt-get remove <package name>

if you intend to re-install the package later and:

apt-get purge <package name>

if you don't want that package ever again.

To know what's installed, I suggest you use dpkg directly:

dpkg --list | less

The pipe and less command is so you can easily scroll and search the results of the command. Note that all packages listed are not all installed. The first 2 or 3 letters to the left tell you the current status of the package. For detailed info, check out the man page:

man dpkg-query

It explains each flag.

Otherwise, as Юнгвирт Тони mentioned, the apt-cache show command shows the cache, not what you have installed. Not only that, on Ubuntu, if you installed X-Windows, you have a graphical installer. I don't use it and removed the icon, but you should be able to find something named "Software Manager" or alike in your menus or icons...

2
  • dpkg --list firefox indeed helped me to acknowledge, what was worrying about web browser. But I also had similar issue as this please have a look at my comment and suggest me what shall I do
    – kern
    Aug 3, 2013 at 15:40
  • Note that you can ignore those extras until your hard drive is full. That's what I do and it works just fine. Aug 3, 2013 at 17:09
2

To only remove earlier versions but keep the current version in the cache, use

sudo apt-get autoclean

Do not use apt-get clean. That would remove everything from the cache, including the current versions.

Additionally, run sudo apt-get autoremove in case you have left-over packages which were dependencies of something you no longer have.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .