Pkcon is the preferred way of dealing with packages in KDE neon and is the back end of Discover, KDE neons graphical package manager. You can use Apt as well but you might run into problems with dependencies while updating and in the end it is easier to just use one system.
Luckily, pkcon is pretty much the same as apt in terms of it’s usage. I will go through some of the normal uses below but there are more detailed instructions in a KDE neon installation that can be accessed by opening Konsole and typing,
This will bring up the man page for pkcon, up/down arrows or a mouse wheel will navigate it and the character q will close it.
All the below examples will assume you are entering the commands in Konsole or a terminal.
Searching for a package using pkcon
To search for a package type,
sudo pkcon search <characters to be searched for>
I find myself using this more and more as a way to search for packages, mainly because I forget a package name and it tells me which ones are installed.
Installing a package using pkcon
To install a package type,
sudo pkcon install <package to be installed>
This is actually a good example of when searching is a good idea. You need to know the proper package name to install it and discover doesn’t give you package names, just application names.
Install a downloaded package using pkcon
To install a downloaded package, go to the folder containing the package in Konsole and type,
sudo pkcon install-local <package to be installed>
This is handy if you have downloaded a package such as the Mega cloud storage sync client to your Downloads folder and want to install it. If you use dpkg -i as you normally would on Ubuntu it will give dependency errors.
Remove a package using pkcon
To remove a package type,
sudo pkcon remove <package to be removed>
This is another situation where using pkcon to search is a good option.
Refresh the package cache of pkcon
To refresh the package cache type,
sudo pkcon refresh
This will refresh any cached information about updates.
Update packages with pkcon
To update the systems packages type,
sudo pkcon update
This is the recommended way to update KDE neon. Although it is usually joined with the refresh command to ensure all the updates are the latest. More information can be found about updating here. More details on Package Kit can be found here.