How to install and uninstall in Terminal


I switch to Fedora and I wan’t to understand.
For example I install nexcloud-client

sudo dnf install nexcloud-client

When I wan’t to remove it, what I need to do?

sudo dnf purge nextcloud-client

or should I use erase or remove instead of purge?

Also I want to know how dnf can list me all installed packages? dnf list?
When I use the software center and search for Nexcloud it doesn’t show the installed nextcloud-client.



sudo dnf remove nextcloud-client

1 Like

Welcome to :fedora: :clap:t5:

sudo dnf remove nextcloud-client will remove the NextCloud Client you installed.

there are MANY dnf commands. Here are the Docs :

Here are some tips on dnf commands :

List only installed packages:

dnf list installed

Search for packages:

dnf list <package_name>

Use wildcards for broader searches:

dnf list "*<keyword>*"

List installed packages satisfying a pattern:

dnf list installed | grep '<pattern>'


It shows me


With remove it will uninstall all this package?

1 Like

That is correct !

I did it and it removes Nextcloud but after reinstall it was already login, so its not the best way?

Did you have some config files with credentials ?

I have no idea what you mean. I just install it, login, uninstall and install it again. I was login and sync starts after first run (after reinstall)

That is the expected behaviour. When you uninstall a package, it removes the files that it installed. It does not remove the users’ configurations, which are stored in their home directories. (Similarly, if you uninstall LibreOffice from a machine, it will not delete spreadsheets that users have created. Nor should it, IMHO.)

1 Like

@l-c-g Welcome to :fedora: :handshake:t5:

1 Like

Added dnf

And whats the way to uninstall all data?

There is no automated way to do this. On Debian-based systems, apt has a ‘purge’ functionality, which also removes global configuration data (typically files in /etc/). I don’t know how to get dnf to do this. And I am not aware of any package manager that removes data from users’ homes, on any distro.

If you want to do this, you need to do it manually. Typically, a package stores its user configuration either in a hidden directory in your home (such as ~/.mozilla) or in a directory under ~/.config/. Flatpaks have their own directories under ~/.var/app.

Your expectation of having the package manager do this automatically only really makes sense if you are the only user on your system. If a system is shared between several people, the package manager would have to go through all home directories of all the users of the system, which is not trivial in more complex setups, and delete files, which would surprise and possibly anger all the users who did not initiate this and who lost their configuration due to some careless admin user.


Thx Lars

That is an excellent question for a normal Fedora user like most of us. Thank you for that.
Make Linux & Fedora more user-friendly everyday.