Manage Debian packages with the Smart Package Manager

Command Line

More actions are available through the command-line interface. The syntax and function of the options in many cases match those of the Debian apt, apt-get, aptitude [4], and apt-cache tools. The developers have also added several useful options to SmartPM (Table 2). The general command form is:

Table 2

Command-Line SmartPM




smart update


Update all package sources

smart update <source>


Update a specific package source

smart install <package>


Install a package



Download but do not install

smart reinstall <package>


Install a package again

smart remove <package>


Delete a package

smart update <package>


Apply security patches

smart upgrade <package>


Install a newer version of a package



Check for an update



Check and update, if a new package exists

smart check


Validate dependencies

smart fix


Repair dependencies by retroactively installing or removing packages

smart clean


Clean the cache

smart search <package>


Find a package



List installed packages

smart query <package>


Query local and repository databases



List the many query options

smart info <package>


Output detailed package information



Enter interactive mode

smart <command> <options> <package>

The --help option listed under smart query can also be used with other commands to list options and a few usage examples.

Curiously, the smart remove <package> tool is missing an option in the style of Aptitude's --purge, which completely removes the configuration files. Queries about installed packages and source packages showed inconsistencies in the form of erroneous output. For example, the smart search --installed <package> command should only list installed <package> components, but in reality, it does far more (Figure 4).

Figure 4: The search for gimp returns more matches than expected.


SmartPM's interactive interface is in many ways similar to the Apt shell [5]. In a terminal, users can run special commands such as install, remove, reinstall, update, upgrade, check, and fix. Their functions are consistent with the options discussed previously. One exception is ls, which lets you conveniently browse through the list of packages.

To enter interactive mode, type

sudo smart --shell

in the terminal. It is important to note that the software only initially performs individual operations on the cache. To implement the changes on the system, you need to issue the commit command. For example, Figure 5 shows the complete process of removing the mc package.

Figure 5: SmartPM only changes the package buffer first. You need to commit the operation for the software to implement the changes.

A complete list of all the other commands can be obtained by typing help. To exit shell mode, type either EOF, exit, or quit. SmartPM remembers the commands you type but not the scheduled operations. Thus, it behaves differently from Aptitude, which has a memory feature.


SmartPM is a good thing: On one hand, it offers all the features you need in everyday package management in a compact GUI. The GUI impresses with a well-planned design; it is stable and intuitive. Like PackageKit, the program attempts to provide a unified front end for various systems. This makes maintenance of various distributions easier.

On the other hand, SmartPM combines a variety of functions that you will probably know from the Apt group of tools in its shell interface. This mode is perfect for anyone who wants to leverage the full power of the package management functions.

A few small errors came to light in the command line: Not all of the options seemed to work properly. All told, however, the software left a very positive impression.


  1. SmartPM:
  2. SmartPM features:
  3. Feature request for updating branches of package lists:
  4. "Apt-get vs. Aptitude" by Frank Hofmann and Axel Beckert, Ubuntu User, No. 18, pg. 44
  5. Apt shell:

The Author

Frank Hofmann ( studied computer science at the Technical University of Chemnitz, Germany. He is currently working with Berlin's Büro 2.0, an open source expert network, as a service provider specializing in printing and pre-press. He is a co-founder of the training company Wizards of FOSS. Since 2008 he has also coordinated the regional meeting of the Berlin-Brandenburg region Linux user group.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Smart Package Manager

    The package manager is one of the central components on any Linux system. If you have a system with unreliable package management – such as Suse Linux 10.1 – you may want to consider the Smart alternative.

  • FHEM

    If you want to equip your home with smart technology, you will need to deal with a variety of providers and what are often incompatible standards. FHEM is a free integration platform that houses the building blocks under one roof and offers visually appealing interfaces.

  • Controlling a Smart Plug

    You could spend hundreds of dollars on specialized IoT appliances and fixtures, or you could just hack a smart plug and talk to it with your Linux system.

  • SSH Reverse Tunnels

    We’ll show you a practical project for monitoring home energy usage with SSH and OpenWrt.

  • apt vs. apt-get

    The apt command-line utility is a successor to the well known apt-get, offering simpler installation and maintenance for the DEB packages used with Debian, Ubuntu, Knoppix, and many other Linux distros.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More