Q. How do I simulate the upgrade first to confirm that the actions that would be taken are reasonable under Debian / Ubuntu Linux package management?

A. Dry run is really good idea under for all production servers. You can print the actions that would normally be performed, but don’t actually perform them. This does not require root privileges. It is recommended that you simulate the upgrade first to confirm that the actions that would be taken are reasonable. The upgrade may be simulated by issuing the command:
# aptitude -s -y dist-upgrade
$ sudo aptitude -s -y dist-upgrade
Sample output:

 aptitude -s -y dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading extended state information      
Initializing package states... Done
Reading task descriptions... Done  
Building tag database... Done    
The following packages are unused and will be REMOVED:
The following packages will be upgraded:
1 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B/199kB of archives. After unpacking 119kB will be freed.
Would download/install/remove packages.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Ramesh | The Geek Stuff Jul 8, 2008 @ 0:43


    I totally agree with you. I don’t install anything without first doing a dry-run. Even if you are just installing a single package, it is good to do a dry run to make sure it works properly before really installing it.

    On a side note, if you are installing a package using rpm, you can perform the following to test it before installing it.

    rpm -ivh package-name.rpm –test

    The Geek Stuff

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum