November 24, 2024

How to Display a List of All Packages Installed in ROS2

In this brief tutorial, we explain how to display a list of all packages installed in ROS2. The command given below will work for any version of ROS2. In my case, I am using ROS2 Iron Irwini, however, after sourcing the environment (which is a command specific to the particular ROS2 distribution), the command for listing all the packages is the same for all distributions.

To display the list of packages, first, you need to open a new Linux terminal and to source your environment. In my case, I am using ROS2 Iron Irwini, and consequently, I type

source /opt/ros/iron/setup.bash

Then, to list all the packages, you need to type

ros2 pkg list

This command will produce a list of all packages installed on my Linux machine:

action_msgs
action_tutorials_cpp
action_tutorials_interfaces
action_tutorials_py
actionlib_msgs
actuator_msgs
ament_cmake
ament_cmake_auto
ament_cmake_copyright
ament_cmake_core
ament_cmake_cppcheck
ament_cmake_cpplint
ament_cmake_export_definitions
ament_cmake_export_dependencies
ament_cmake_export_include_directories
ament_cmake_export_interfaces
ament_cmake_export_libraries
ament_cmake_export_link_flags
ament_cmake_export_targets
ament_cmake_flake8
ament_cmake_gen_version_h
ament_cmake_gmock
ament_cmake_gtest
ament_cmake_include_directories
ament_cmake_libraries
ament_cmake_lint_cmake
ament_cmake_pep257
ament_cmake_pytest
ament_cmake_python
ament_cmake_ros
ament_cmake_target_dependencies
ament_cmake_test
ament_cmake_uncrustify
ament_cmake_version
ament_cmake_xmllint
ament_copyright
ament_cppcheck
ament_cpplint
ament_flake8
ament_index_cpp
ament_index_python
ament_lint
ament_lint_auto
ament_lint_cmake
ament_lint_common
ament_package
ament_pep257
ament_uncrustify
ament_xmllint
angles
builtin_interfaces
camera_calibration_parsers
camera_info_manager
class_loader
common_interfaces
composition
composition_interfaces
compressed_depth_image_transport
compressed_image_transport
console_bridge_vendor
control_msgs
controller_manager_msgs
cv_bridge
demo_nodes_cpp
demo_nodes_cpp_native
demo_nodes_py
depthimage_to_laserscan
desktop
diagnostic_msgs
domain_coordinator
dummy_map_server
dummy_robot_bringup
dummy_sensors
eigen3_cmake_module
example_interfaces
examples_rclcpp_minimal_action_client
examples_rclcpp_minimal_action_server
examples_rclcpp_minimal_client
examples_rclcpp_minimal_composition
examples_rclcpp_minimal_publisher
examples_rclcpp_minimal_service
examples_rclcpp_minimal_subscriber
examples_rclcpp_minimal_timer
examples_rclcpp_multithreaded_executor
examples_rclpy_executors
examples_rclpy_minimal_action_client
examples_rclpy_minimal_action_server
examples_rclpy_minimal_client
examples_rclpy_minimal_publisher
examples_rclpy_minimal_service
examples_rclpy_minimal_subscriber
fastrtps_cmake_module
gazebo_dev
gazebo_msgs
gazebo_plugins
gazebo_ros
gazebo_ros_pkgs
geometry2
geometry_msgs
image_geometry
image_tools
image_transport
image_transport_plugins
interactive_markers
intra_process_demo
joint_state_publisher
joint_state_publisher_gui
joy
kdl_parser
keyboard_handler
laser_geometry
launch
launch_ros
launch_testing
launch_testing_ament_cmake
launch_testing_ros
launch_xml
launch_yaml
libcurl_vendor
libstatistics_collector
libyaml_vendor
lifecycle
lifecycle_msgs
logging_demo
map_msgs
mcap_vendor
message_filters
nav_msgs
orocos_kdl_vendor
osrf_pycommon
pcl_conversions
pcl_msgs
pendulum_control
pendulum_msgs
pluginlib
pybind11_vendor
python_cmake_module
python_qt_binding
qt_dotgraph
qt_gui
qt_gui_cpp
qt_gui_py_common
quality_of_service_demo_cpp
quality_of_service_demo_py
rcl
rcl_action
rcl_interfaces
rcl_lifecycle
rcl_logging_interface
rcl_logging_spdlog
rcl_yaml_param_parser
rclcpp
rclcpp_action
rclcpp_components
rclcpp_lifecycle
rclpy
rcpputils
rcutils
resource_retriever
rmw
rmw_dds_common
rmw_fastrtps_cpp
rmw_fastrtps_shared_cpp
rmw_implementation
rmw_implementation_cmake
robot_state_publisher
ros2action
ros2bag
ros2cli
ros2cli_common_extensions
ros2component
ros2doctor
ros2interface
ros2launch
ros2lifecycle
ros2multicast
ros2node
ros2param
ros2pkg
ros2run
ros2service
ros2topic
ros_base
ros_core
ros_environment
ros_gz_bridge
ros_gz_interfaces
ros_ign_bridge
ros_image_to_qimage
ros_workspace
rosbag2
rosbag2_compression
rosbag2_compression_zstd
rosbag2_cpp
rosbag2_interfaces
rosbag2_py
rosbag2_storage
rosbag2_storage_default_plugins
rosbag2_storage_mcap
rosbag2_storage_sqlite3
rosbag2_transport
rosgraph_msgs
rosidl_adapter
rosidl_cli
rosidl_cmake
rosidl_core_generators
rosidl_core_runtime
rosidl_default_generators
rosidl_default_runtime
rosidl_dynamic_typesupport
rosidl_dynamic_typesupport_fastrtps
rosidl_generator_c
rosidl_generator_cpp
rosidl_generator_py
rosidl_generator_type_description
rosidl_parser
rosidl_pycommon
rosidl_runtime_c
rosidl_runtime_cpp
rosidl_runtime_py
rosidl_typesupport_c
rosidl_typesupport_cpp
rosidl_typesupport_fastrtps_c
rosidl_typesupport_fastrtps_cpp
rosidl_typesupport_interface
rosidl_typesupport_introspection_c
rosidl_typesupport_introspection_cpp
rpyutils
rqt
rqt_action
rqt_bag
rqt_bag_plugins
rqt_common_plugins
rqt_console
rqt_controller_manager
rqt_graph
rqt_gui
rqt_gui_cpp
rqt_gui_py
rqt_image_overlay
rqt_image_overlay_layer
rqt_image_view
rqt_joint_trajectory_controller
rqt_moveit
rqt_msg
rqt_plot
rqt_publisher
rqt_py_common
rqt_py_console
rqt_reconfigure
rqt_robot_dashboard
rqt_robot_monitor
rqt_robot_steering
rqt_runtime_monitor
rqt_service_caller
rqt_shell
rqt_srv
rqt_tf_tree
rqt_topic
rttest
rviz2
rviz_assimp_vendor
rviz_common
rviz_default_plugins
rviz_ogre_vendor
rviz_rendering
sdl2_vendor
sensor_msgs
sensor_msgs_py
service_msgs
shape_msgs
shared_queues_vendor
spdlog_vendor
sqlite3_vendor
sros2
sros2_cmake
statistics_msgs
std_msgs
std_srvs
stereo_msgs
tango_icons_vendor
teleop_twist_joy
teleop_twist_keyboard
tf2
tf2_bullet
tf2_eigen
tf2_eigen_kdl
tf2_geometry_msgs
tf2_kdl
tf2_msgs
tf2_py
tf2_ros
tf2_ros_py
tf2_sensor_msgs
tf2_tools
theora_image_transport
tinyxml2_vendor
tinyxml_vendor
tlsf
tlsf_cpp
topic_monitor
tracetools
trajectory_msgs
turtlesim
type_description_interfaces
uncrustify_vendor
unique_identifier_msgs
urdf
urdf_parser_plugin
usb_cam
vision_msgs
visualization_msgs
xacro
yaml_cpp_vendor
zstd_vendor