"use client" import React, { useState } from "react" import Link from "next/link" import { Package, ArrowLeft, Copy, Check, Terminal } from "lucide-react" import { Button } from "@/components/ui/button" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion" export default function UpdateCommandsPage() { const [viewMode, setViewMode] = useState<"table" | "accordion">("table") // Group commands by category for better organization const commandGroups = [ { title: "System Updates", commands: [ { command: "apt update && apt upgrade -y", description: "Update and upgrade all system packages" }, { command: "apt dist-upgrade -y", description: "Full system upgrade, including dependencies" }, { command: "apt update", description: "Update package lists only" }, { command: "apt upgrade", description: "Upgrade packages only (interactive)" }, { command: "apt full-upgrade", description: "Upgrade packages with dependency handling (interactive)" }, ], }, { title: "Proxmox Updates", commands: [ { command: "pveupdate", description: "Update Proxmox package lists" }, { command: "pveupgrade", description: "Show available Proxmox upgrades" }, { command: "pve-upgrade", description: "Perform Proxmox VE upgrade" }, { command: "pveceph upgrade", description: "Upgrade Ceph packages (if Ceph is installed)" }, ], }, { title: "Package Management", commands: [ { command: "apt autoremove --purge", description: "Remove unused packages and their config" }, { command: "apt clean", description: "Clear out the local repository of retrieved package files" }, { command: "apt autoclean", description: "Clear out only outdated package files" }, { command: "apt install ", description: "Install a specific package" }, { command: "apt remove ", description: "Remove a package" }, { command: "apt purge ", description: "Remove a package and its configuration files" }, ], }, { title: "Package Information", commands: [ { command: "apt list --installed", description: "List all installed packages" }, { command: "apt search ", description: "Search for packages by keyword" }, { command: "apt show ", description: "Show detailed information about a package" }, { command: "dpkg -l", description: "List all installed packages (alternative)" }, { command: "dpkg -l | grep ", description: "Search installed packages by keyword" }, { command: "apt-cache policy ", description: "Show package versions and priorities" }, ], }, { title: "Repository Management", commands: [ { command: "cat /etc/apt/sources.list", description: "Show main APT repository sources" }, { command: "ls -la /etc/apt/sources.list.d/", description: "List additional repository source files" }, { command: "cat /etc/apt/sources.list.d/pve-enterprise.list", description: "Show Proxmox Enterprise repo config", }, { command: "apt-key list", description: "List repository signing keys" }, ], }, ] return (
Back to Help and Info

Updates and Packages Commands

This section provides commands for managing system updates and packages in Proxmox VE. Learn how to update your system, install and remove packages, search for software, and manage repositories.

{viewMode === "table" ? (
{commandGroups.map((group, index) => (

{group.title}

Command Description Action {group.commands.map((cmd, cmdIndex) => ( {cmd.command} {cmd.description} ))}
))}
) : (
{commandGroups.map((group, index) => (

{group.title}

{group.commands.map((cmd, cmdIndex) => (
{cmd.command}
{cmd.command}

{cmd.description}

))}
))}
)}

Update Best Practices

  • Always run apt update before installing or upgrading packages
  • Consider creating a VM snapshot or backup before performing major system upgrades
  • Replace <package> with the actual package name
  • Replace <keyword> with your search term
  • Use apt autoremove --purge periodically to clean up unused packages and free disk space
) } interface CopyButtonProps { text: string } function CopyButton({ text }: CopyButtonProps) { const [copied, setCopied] = React.useState(false) const copyToClipboard = () => { navigator.clipboard.writeText(text) setCopied(true) setTimeout(() => setCopied(false), 2000) } return ( ) }