I downloaded LibreOffice 4.1 and I want to install it in Ubuntu. I read its readme file. It said I have to first uninstall previous LibreOffice but I don't know how to do uninstall it.
3 Answers
If you want to install a package on top of another one, system package management tools should take care of it, so you could locate your package, say its called libreoffice.deb
, and just run
sudo dpkg -i libreoffice.deb
If the package is indeed the same application but another version than the one installed, you will read in the terminal that the package you are installing will be unpacked as a replacement.
If you still need to remove the previous package, or you just want to know how to remove a package, the following command is what you're looking for:
sudo apt-get remove libreoffice*
(The asterisk will make match all packages whose name start with libreoffice
, like libreoffice-3.0
for example. For more information on wild cards like these look into regular expressions.)
But you're better off installing the official PPA
This way apt will handle your software. A Google search for
libreoffice ppa
yields LibreOffice's launchpad page, from which you can view instructions on installing the PPA. In fact, its as simple as running
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update
sudo apt-get upgrade
:)
(Note that installing through the PPA will replace your current LibreOffice install without need for removing it; it will also keep it up to date!)

- 5,971
-
2WARNING: this ppa contains development versions and is not considered production-worthy. If you require a stable version you should use one of the version-specific ppa's listed on the launchpad site – amc Aug 01 '13 at 06:53
-
Great point, also thanks for the edit I don't know how I forgot the other essential commands – Severo Raz Aug 01 '13 at 20:37
-
I downloaded its stable version 4.1 .deb files from libreoffice. I want to install them. but I don't know how to de-install previous version of libreoffice from my PC. – sajjad Aug 01 '13 at 22:13
-
Ok I updated the answer so it answers your question directly without evasion :) – Severo Raz Aug 02 '13 at 00:23
Before installing the newer version, you want to remove the previous version.
Type the following in terminal to remove libreoffice.
sudo apt-get remove --purge libreoffice*
sudo apt-get clean
sudo apt-get autoremove
-
1there is no need to remove it before upgrading -- in fact, this will make it more difficult to reinstall the newer version because you will have removed the additional packages Libre Office needs to look/feel native with Unity – amc Aug 01 '13 at 06:51
-
I see these: "If you have a previous version of LibreOffice already installed, then you will need to de-install it before proceeding further." in libreoffice 4.1.0.4 which I downloaded its .deb files from libreoffice. – sajjad Aug 01 '13 at 22:17
-
To clarify: if you are using a ppa or other repository then you normally don't need the deinstall prior to upgrading. However, if you use the deb file directly from the site you will likely need to. Keep in mind that the version directly from the site won't have the look/feel of unity and gnome because you won't get all the other packages that Ubuntu includes with LO from the repos – amc Aug 01 '13 at 23:43
The libreoffice/ppa is labeled as "test builds and backports" although it is managed by the maintainer of LibreOffice in Ubuntu.
So it might be a better idea to use instead libreoffice/libreoffice-4-1 which is labeled as "stable backports" although it takes several days longer to become available.
The Terminal commands required:
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt-get update && sudo apt-get dist-upgrade

- 10,996
apt
or via the software centre) you should be ok just performing an upgrade – amc Aug 01 '13 at 06:56