Introduction to DPKG and APT-GET

From SuperX Documentation and Help
Jump to navigation Jump to search

APT stands for Advanced Packaging Tool while DPKG is Debian Package Management System. SuperX is based on KDE Neon and thus, is based on Debian. Hence it features these two important Debian utilities.

Both these tools allow easy and quick installation of software packages.


DPKG enables you to install new software packages like apps, themes, libraries, etc. from files known as packages. These packages end in the .deb extension. Many popular software developers allow debs to be downloaded from their website.

Installing a package

Just download the .deb package and place it in a memorable location.

Open a terminal window and navigate to the proper location with cd command.

After that, type

sudo dpkg -i filename.deb

to install the package (replace 'filename' with the real name of the package).

Enter your password when asked.

Listing all installed packages

Typing the following commands in the terminal lists all the installed packages:

sudo dpkg -l

To filter such a long list, in case you are looking for a particular package, type:

sudo dpkg -l pattern

This will filter the list by listing only those packages that have the word 'pattern' in them. (Remember to replace 'pattern' with your desired search query.)

Removing a package

Removing a package is as easy as typing:

sudo dpkg -r packagename

Hence, 'packagename' will be removed. (Remember to replace 'packagename' with the actual package that is already installed.)

If you wish to remove a package without keeping any of its configurations, type:

sudo dpkg --purge packagename

Further info

For more info on DPKG, you can refer to the Debian handbook or type

man dpkg

in the terminal.


APT is an utility that eases the searching for .deb packages, by maintaining a list of sources (a.k.a. repositories) and then downloading and installing from them. This eliminates the need for manual searching for debs online. Also, it updates packages if a newer version is available. In short, it enhances the power of DPKG.

Updating repository information

To update information on available repositories (in other words, check for updates), type in the terminal:

sudo apt update

and wait for it to complete.

Performing a software update

To update all installed packages to the latest available version, type:

sudo apt upgrade

To update everything on the system to the latest and the greatest, including installing recommended new packages (for a more thorough update), type:

sudo apt full-upgrade

This can take a significant amount of time to complete. So please be patient.

Searching for software

To search for available software packages, type:

sudo apt-cache search query

where 'query' should be replaced by your search query.

When you find a particular package and want to know more about it, type:

sudo apt-cache show package

where 'package' is the name of the package you wish to know more about.

Installing new software

You can install a new software package by typing:

sudo apt-get install package

where 'package' should be substituted with the name of the package. APT will automatically find the package from the right source and install it for you.

Removing a package

When you no longer need a package, you can remove it by typing:

sudo apt-get remove package

where 'package' should be substituted with the name of the package.

In case you don't want to keep configuration for the package, type this instead:

sudo apt-get purge package

replacing 'package' with the correct package name.

Removing unneeded software

Often many software packages require other packages (a.k.a. dependencies) to properly run. So when such package is installed, the dependencies get automatically installed as well. But, when we remove that package, the additional packages are left behind and are not uninstalled. To remove these additional packages (that can take up extra storage space), type this:

sudo apt-get autoremove

This command alone removes all possible packages that are not going to be used any more. Please use this command with caution, as it can accidentally remove a required package.