Results 1 to 6 of 6

Thread: When package was installed

  1. #1
    Join Date
    Aug 2016
    Location
    El Lago, Texas
    Beans
    746
    Distro
    Ubuntu Mate

    When package was installed

    I would like to find out WHEN pm-utils was installed.

    I looked thru PPM but could not find install date.
    Ubuntu Mate 18.04 Bionic and Ubuntu Mate 20.04
    Mate Desktop

  2. #2
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: When package was installed

    Code:
    _P=pm-utils && (cat /var/log/dpkg.log{,.1};zcat /var/log/dpkg.log.*.gz) | egrep --text "^[^ ]* [^ ]* (configure|install|remove|status [^ ]*|trigproc|upgrade) $_P[: ]" | sort --reverse | less
    There is no guarantee this will return any results. It goes through the dpkg logs grepping for pm-utils, then sorts them in chronological order. Results are displayed using less. Problem is, dpkg logs are rotated out after 14 iterations (including the gzipped ones). So, if your install was before the oldest log date, it won't show you a result.

  3. #3
    Join Date
    Dec 2007
    Beans
    12,521

    Re: When package was installed

    Quote Originally Posted by DuckHook View Post
    ... Problem is, dpkg logs are rotated out after 14 iterations (including the gzipped ones). So, if your install was before the oldest log date, it won't show you a result.
    By the way, the dpkg-related logrotate file is /etc/logrotate.d/dpkg. Mine has
    Code:
    /var/log/dpkg.log {
    	monthly
    	rotate 60
    	compress
    	delaycompress
    	missingok
    	notifempty
    	create 644 root root
    }
    /var/log/alternatives.log {
    	monthly
    	rotate 60
    	compress
    	delaycompress
    	missingok
    	notifempty
    	create 644 root root
    }

  4. #4
    Join Date
    Aug 2016
    Location
    El Lago, Texas
    Beans
    746
    Distro
    Ubuntu Mate

    Re: When package was installed

    thanks. It found that package.
    Ubuntu Mate 18.04 Bionic and Ubuntu Mate 20.04
    Mate Desktop

  5. #5
    Join Date
    Dec 2007
    Beans
    12,521

    Re: When package was installed

    Code:
    zgrep "status installed package_name" /var/log/dpkg.log*
    will list all the dates, from newest to oldest, on which package_name was installed.

    As DuckHook pointed out, the results depend on how many logs are present.

  6. #6
    Join Date
    Aug 2016
    Location
    El Lago, Texas
    Beans
    746
    Distro
    Ubuntu Mate

    Re: When package was installed

    Thanks guys for the info.

    I had rotate 12 in my dpkg.
    Ubuntu Mate 18.04 Bionic and Ubuntu Mate 20.04
    Mate Desktop

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •