The following table shows a comparison of the most important and most used commands for package/software management in SuSE and Debian/Ubuntu systems.
The zypper command is available on SuSE systems.
The apt and related commands are available on Debian and Debian-based systems including Ubuntu, Linux Mint, Knoppix, and a lot more.
|| apt command
|Search package||zypper se "pkgname"||
apt-cache search "pkgname"
|Install package||zypper in "pkgname"
||apt-get install "pkgname"
apt install "pkgname" (newer)
|Update package list from repository||zypper refresh
apt update (newer)
|Update all packages||zypper update||
|Upgrade all packages to new major version*||zypper dist-upgrade
apt dist-upgrade (newer)
|Update a single package||zypper update "pkgname"
||apt-get upgrade "pkgname"
apt upgrade "pkgname"
or "install" should also update the package
|Uninstall/remove a package||zypper remove "pkgname"
||apt-get remove "pkgname"
apt remove "pkgname"
|Remove unused packages||N/A
apt autoremove (newer)
|Show all packages found in repo(s)||zypper packages
|Show updateable packages||zypper list-updates
|Show dependencies of a package||N/A
||apt-cache depends "pkgname"
|Show description of a package||zypper info "pkgname"
||apt-cache show "pkgname"
apt show "pkgname" (newer)
|| rpm command
|List installed packages||rpm -qa||dpkg -l|
|List content of installed package||rpm -ql "pkgname"
||dpkg -L "pkgname"
|List content of package file||rpm -qlp "pkgname".rpm
||dpkg --contents "pkgname".deb
|Install package||rpm -i "pkgname".rpm
||dpkg -i "pkgname".deb
|Show to which package a file belongs
||rpm -qf /path/to/file
||dpkg -S /path/to/file
|Simulate installation of package||rpm -i --test "pkgname".rpm
||dpkg -i --simulate "pkgname"
|Update a package||rpm -U "pkgname".rpm
||N/A (use dpkg -i)
|Uninstall/remove a package||rpm -e "pkgname"
||dpkg -r "pkgname"
If you know additional zypper/apt/rpm/dpkg commands which are worth to be compared and mentioned here, please drop a comment.
Update June 14th, 2013: Added apt-get dist-upgrade to the table. This command allows to upgrade to a newer major software version (e.g. MySQL 5.0 -> 5.1). However it should be mentioned, that although this command exists in Debian, it is unlikely that it's going be used (except for a distribution upgrade, e.g. lenny -> squeeze). The reason for this is the "stable software version" mind of Debian. Ubuntu handles this approach differently and frequently adds newer major versions to their repositories.
Update July 10th, 2015: Added "list content" rpm and dpkg commands.
Update September 16th, 2015: Added "Simulate installation of package" rpm and dpkg commands.
Update March 13th, 2019: Added "apt" short commands.
Update May 31st, 2019: Added "Show to which package a file belongs".
Update September 24th, 2020: Added "Remove unused packages"
anon from wrote on Jan 11th, 2014:
The zypper equivalent for a distribution upgrade (apt-get dist-upgrade) is "zypper dup". See https://en.opensuse.org/SDB:System_upgrade
The Arch wiki has a similar comparison of more tools:
Alexander from Zürich wrote on Jun 12th, 2013:
Might be worth mentioning, that for Debian the "Update all packages" would rather be:
Because of the "all packages" there. Don't know how that compares to zypper.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Container Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb2 InfluxDB Internet Java KVM Kibana Kodi Kubernetes LTS LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Redis SSL Samba Seafile Security Shell SmartOS Solaris Surveillance SystemD Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder