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.
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.)
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.